Author: Ronan Lamy <[email protected]>
Branch: py3.5
Changeset: r90056:43a08e490b5b
Date: 2017-02-11 17:59 +0000
http://bitbucket.org/pypy/pypy/changeset/43a08e490b5b/
Log: Update PyLong_AsLong docstring
diff --git a/pypy/module/cpyext/longobject.py b/pypy/module/cpyext/longobject.py
--- a/pypy/module/cpyext/longobject.py
+++ b/pypy/module/cpyext/longobject.py
@@ -70,9 +70,9 @@
@cpython_api([PyObject], lltype.Signed, error=-1)
def PyLong_AsLong(space, w_long):
"""
- Return a C long representation of the contents of pylong. If
- pylong is greater than LONG_MAX, an OverflowError is raised
- and -1 will be returned."""
+ Get a C long int from an int object or any object that has an __int__
+ method. Return -1 and set an error if overflow occurs.
+ """
return space.int_w(space.int(w_long))
@cpython_api([PyObject], Py_ssize_t, error=-1)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit