summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey B Kirpichev <skirpichev@gmail.com>2024-08-03 11:20:10 (GMT)
committerGitHub <noreply@github.com>2024-08-03 11:20:10 (GMT)
commitd91ac525ef166edc0083acf5a96f81b87324fe7f (patch)
treeae87a374a0dbe5db3a6c2a39097218e799265cb7
parent7a5c4103b094aaf1b65af6de65795d172cfe8fe0 (diff)
downloadcpython-d91ac525ef166edc0083acf5a96f81b87324fe7f.zip
cpython-d91ac525ef166edc0083acf5a96f81b87324fe7f.tar.gz
cpython-d91ac525ef166edc0083acf5a96f81b87324fe7f.tar.bz2
gh-122613: Document PyLong_GetInfo() (part of Limited API) (GH-#122280)
-rw-r--r--Doc/c-api/long.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst
index 4216291..9f2c48d 100644
--- a/Doc/c-api/long.rst
+++ b/Doc/c-api/long.rst
@@ -514,6 +514,17 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
.. versionadded:: 3.14
+.. c:function:: PyObject* PyLong_GetInfo(void)
+
+ On success, return a read only :term:`named tuple`, that holds
+ information about Python's internal representation of integers.
+ See :data:`sys.int_info` for description of individual fields.
+
+ On failure, return ``NULL`` with an exception set.
+
+ .. versionadded:: 3.1
+
+
.. c:function:: int PyUnstable_Long_IsCompact(const PyLongObject* op)
Return 1 if *op* is compact, 0 otherwise.