summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/long.rst
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-01-30 10:30:15 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-01-30 10:30:15 (GMT)
commit93f562c4f9a751034616068468e7dc2cfd022275 (patch)
tree5f41dda113e687676341b3032abc0545c5c4543e /Doc/c-api/long.rst
parenta79b75743af3d7c66fcccc1c47699c838422064b (diff)
downloadcpython-93f562c4f9a751034616068468e7dc2cfd022275.zip
cpython-93f562c4f9a751034616068468e7dc2cfd022275.tar.gz
cpython-93f562c4f9a751034616068468e7dc2cfd022275.tar.bz2
Merged revisions 77842 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77842 | mark.dickinson | 2010-01-30 10:08:33 +0000 (Sat, 30 Jan 2010) | 4 lines Issue #7767: Add new C-API function PyLong_AsLongLongAndOverflow, a long long variant of PyLong_AsLongAndOverflow. Patch by Case Van Horsen. ........
Diffstat (limited to 'Doc/c-api/long.rst')
-rw-r--r--Doc/c-api/long.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst
index 083fe8b..ba9949f 100644
--- a/Doc/c-api/long.rst
+++ b/Doc/c-api/long.rst
@@ -130,6 +130,19 @@ All integers are implemented as "long" integer objects of arbitrary size.
be ``0``.
+.. cfunction:: PY_LONG_LONG PyLong_AsLongLongAndOverflow(PyObject *pylong, int* overflow)
+
+ Return a C :ctype:`long long` representation of the contents of
+ *pylong*. If *pylong* is greater than :const:`PY_LLONG_MAX` or less
+ than :const:`PY_LLONG_MIN`, set `*overflow` to ``1`` or ``-1``,
+ respectively, and return ``-1``; otherwise, set `*overflow` to
+ ``0``. If any other exception occurs (for example a TypeError or
+ MemoryError), then ``-1`` will be returned and ``*overflow`` will
+ be ``0``.
+
+ .. versionadded:: 3.2
+
+
.. cfunction:: Py_ssize_t PyLong_AsSsize_t(PyObject *pylong)
.. index::