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.
This commit is contained in:
Jeremy Hylton 2002-04-23 20:01:20 +00:00
parent 656b735af9
commit c4ad0bcbe5
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}