]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-122613: Document PyLong_GetInfo() (part of Limited API) (GH-122280) (#122645)
authorSergey B Kirpichev <skirpichev@gmail.com>
Mon, 5 Aug 2024 18:11:34 +0000 (21:11 +0300)
committerGitHub <noreply@github.com>
Mon, 5 Aug 2024 18:11:34 +0000 (20:11 +0200)
[3.13] gh-122613: Document PyLong_GetInfo() (part of Limited API) (GH-GH-122280)
(cherry picked from commit d91ac525ef166edc0083acf5a96f81b87324fe7f)

Doc/c-api/long.rst

index c502a825182889db4f3bc214403412cb8d302862..842bf172043137495359919bd46546cd09cebaa6 100644 (file)
@@ -501,6 +501,17 @@ distinguished from a number.  Use :c:func:`PyErr_Occurred` to disambiguate.
    .. versionadded:: 3.13
 
 
+.. 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.