]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-122613: Document PyLong_GetInfo() (part of Limited API) (GH-#122280)
authorSergey B Kirpichev <skirpichev@gmail.com>
Sat, 3 Aug 2024 11:20:10 +0000 (14:20 +0300)
committerGitHub <noreply@github.com>
Sat, 3 Aug 2024 11:20:10 +0000 (13:20 +0200)
Doc/c-api/long.rst

index 42162914c0aec81c36c8775305a6adb531650246..9f2c48d98b83449787f58fdf675b8d348bab3ea3 100644 (file)
@@ -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.