Kaydet (Commit) c4ad0bcb authored tarafından Jeremy Hylton's avatar Jeremy Hylton

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.
üst 656b735a
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment