[Python-checkins] python/dist/src/Objects longobject.c,1.116,1.117

jhylton@sourceforge.net jhylton@sourceforge.net
Tue, 23 Apr 2002 13:01:22 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv31257a/Objects

Modified Files:
	longobject.c 
Log Message:
Clarify return value of PyLong_AsLongLong().

The function is documented to return -1 on error.  If res was < 0, it
returned res.  It wasn't clear that the invariant was res < 0 iff res
== -1.



Index: longobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -C2 -d -r1.116 -r1.117
*** longobject.c	12 Apr 2002 02:44:10 -0000	1.116
--- longobject.c	23 Apr 2002 20:01:20 -0000	1.117
***************
*** 697,701 ****
  	/* Plan 9 can't handle LONG_LONG in ? : expressions */
  	if (res < 0)
! 		return (LONG_LONG)res;
  	else
  		return bytes;
--- 697,701 ----
  	/* Plan 9 can't handle LONG_LONG in ? : expressions */
  	if (res < 0)
! 		return (LONG_LONG)-1;
  	else
  		return bytes;