summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2002-04-23 20:01:20 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2002-04-23 20:01:20 (GMT)
commitc4ad0bcbe5891f0e0df297b28d211696aad5d1ba (patch)
treecfa06b72894bf740560b8fc47cd18f13d0e23b4b /Objects
parent656b735af9c3b4efdad93307da92555bab36c562 (diff)
downloadcpython-c4ad0bcbe5891f0e0df297b28d211696aad5d1ba.zip
cpython-c4ad0bcbe5891f0e0df297b28d211696aad5d1ba.tar.gz
cpython-c4ad0bcbe5891f0e0df297b28d211696aad5d1ba.tar.bz2
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.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/longobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index f11c016..cbc9f68 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -696,7 +696,7 @@ PyLong_AsLongLong(PyObject *vv)
/* Plan 9 can't handle LONG_LONG in ? : expressions */
if (res < 0)
- return (LONG_LONG)res;
+ return (LONG_LONG)-1;
else
return bytes;
}