summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/long.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-07-21 11:48:30 (GMT)
committerGitHub <noreply@github.com>2023-07-21 11:48:30 (GMT)
commit6bde1b9f049e35e557068bd8c6034ee9c6fe61dc (patch)
tree10a0a9e40dc0b60405258ce1978fb9970c8c8e6c /Doc/c-api/long.rst
parent0a57620887f9877398c44062539da3e58235f0e6 (diff)
downloadcpython-6bde1b9f049e35e557068bd8c6034ee9c6fe61dc.zip
cpython-6bde1b9f049e35e557068bd8c6034ee9c6fe61dc.tar.gz
cpython-6bde1b9f049e35e557068bd8c6034ee9c6fe61dc.tar.bz2
[3.11] gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920) (GH-106952)
(cherry picked from commit fcc816dbff7ca66c26f57a506e4d2330fe41d0ff)
Diffstat (limited to 'Doc/c-api/long.rst')
-rw-r--r--Doc/c-api/long.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst
index de19158..874e962 100644
--- a/Doc/c-api/long.rst
+++ b/Doc/c-api/long.rst
@@ -141,8 +141,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.
@@ -182,8 +182,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.