summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/long.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-17 10:54:57 (GMT)
committerGeorg Brandl <georg@python.org>2010-10-17 10:54:57 (GMT)
commit79cdff0b9b951780f08d945c5efeb773a2c9ca64 (patch)
tree20a6af74ebdd1acd0b8a4beeefe77f2039e3e632 /Doc/c-api/long.rst
parent27fa482afd8d95dba3e869c0be1dc8762b6c6718 (diff)
downloadcpython-79cdff0b9b951780f08d945c5efeb773a2c9ca64.zip
cpython-79cdff0b9b951780f08d945c5efeb773a2c9ca64.tar.gz
cpython-79cdff0b9b951780f08d945c5efeb773a2c9ca64.tar.bz2
#1945: document Unicode functions backported from py3k branch.
Diffstat (limited to 'Doc/c-api/long.rst')
-rw-r--r--Doc/c-api/long.rst28
1 files changed, 28 insertions, 0 deletions
diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst
index b9920a9..11d2908 100644
--- a/Doc/c-api/long.rst
+++ b/Doc/c-api/long.rst
@@ -65,6 +65,22 @@ Long Integer Objects
.. versionadded:: 2.6
+.. cfunction:: PyObject* PyLong_FromSsize_t(Py_ssize_t v)
+
+ Return a new :ctype:`PyLongObject` object with a value of *v*, or *NULL*
+ on failure.
+
+ .. versionadded:: 2.6
+
+
+.. cfunction:: PyObject* PyLong_FromSize_t(size_t v)
+
+ Return a new :ctype:`PyLongObject` object with a value of *v*, or *NULL*
+ on failure.
+
+ .. versionadded:: 2.6
+
+
.. cfunction:: PyObject* PyLong_FromLongLong(PY_LONG_LONG v)
Return a new :ctype:`PyLongObject` object from a C :ctype:`long long`, or *NULL*
@@ -183,6 +199,18 @@ Long Integer Objects
raised.
+.. cfunction:: Py_ssize_t PyLong_AsSsize_t(PyObject *pylong)
+
+ .. index::
+ single: PY_SSIZE_T_MAX
+
+ Return a :ctype:`Py_ssize_t` representation of the contents of *pylong*. If
+ *pylong* is greater than :const:`PY_SSIZE_T_MAX`, an :exc:`OverflowError` is
+ raised.
+
+ .. versionadded:: 2.6
+
+
.. cfunction:: PY_LONG_LONG PyLong_AsLongLong(PyObject *pylong)
.. index::