diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-07-21 11:48:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-21 11:48:15 (GMT) |
commit | ac9aa8a369e03784c5df7f2f8b598959fc9ef5f4 (patch) | |
tree | ebbf7a80b1c17857f0c2a16bea186817de7ad6b1 /Doc/c-api/long.rst | |
parent | 807afdac416356c5e4558f11a8e1cfc5f0c86dd7 (diff) | |
download | cpython-ac9aa8a369e03784c5df7f2f8b598959fc9ef5f4.zip cpython-ac9aa8a369e03784c5df7f2f8b598959fc9ef5f4.tar.gz cpython-ac9aa8a369e03784c5df7f2f8b598959fc9ef5f4.tar.bz2 |
[3.12] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106951)
(cherry picked from commit fcc816dbff7ca66c26f57a506e4d2330fe41d0ff)
Diffstat (limited to 'Doc/c-api/long.rst')
-rw-r--r-- | Doc/c-api/long.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst index fe379ff..f1354a3 100644 --- a/Doc/c-api/long.rst +++ b/Doc/c-api/long.rst @@ -142,8 +142,8 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate. instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` method (if present) to convert it to a :c:type:`PyLongObject`. - If the value of *obj* is greater than :const:`LONG_MAX` or less than - :const:`LONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively, and + If the value of *obj* is greater than :c:macro:`LONG_MAX` or less than + :c:macro:`LONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively, and return ``-1``; otherwise, set *\*overflow* to ``0``. If any other exception occurs set *\*overflow* to ``0`` and return ``-1`` as usual. @@ -183,8 +183,8 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate. instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` method (if present) to convert it to a :c:type:`PyLongObject`. - If the value of *obj* is greater than :const:`LLONG_MAX` or less than - :const:`LLONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively, + If the value of *obj* is greater than :c:macro:`LLONG_MAX` or less than + :c:macro:`LLONG_MIN`, set *\*overflow* to ``1`` or ``-1``, respectively, and return ``-1``; otherwise, set *\*overflow* to ``0``. If any other exception occurs set *\*overflow* to ``0`` and return ``-1`` as usual. |