summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-02-07 10:55:21 (GMT)
committerGitHub <noreply@github.com>2024-02-07 10:55:21 (GMT)
commita69e68db6075c6c64d3b97513d9be768037579cb (patch)
treed38235f1347c9906b69425aaf722f00d7e826773 /Doc/c-api
parent060c3edc4bcdc6873676f4b2153e6122f9f085bf (diff)
downloadcpython-a69e68db6075c6c64d3b97513d9be768037579cb.zip
cpython-a69e68db6075c6c64d3b97513d9be768037579cb.tar.gz
cpython-a69e68db6075c6c64d3b97513d9be768037579cb.tar.bz2
[3.12] gh-101100: Fix Py_DEBUG dangling Sphinx references (GH-115003) (#115135)
gh-101100: Fix Py_DEBUG dangling Sphinx references (GH-115003) (cherry picked from commit d0322fdf2c1a7292a43959fe5a572d783b88a1c4) Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/intro.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst
index 26c0168..5612493 100644
--- a/Doc/c-api/intro.rst
+++ b/Doc/c-api/intro.rst
@@ -148,7 +148,7 @@ complete listing.
worse performances (due to increased code size for example). The compiler is
usually smarter than the developer for the cost/benefit analysis.
- If Python is :ref:`built in debug mode <debug-build>` (if the ``Py_DEBUG``
+ If Python is :ref:`built in debug mode <debug-build>` (if the :c:macro:`Py_DEBUG`
macro is defined), the :c:macro:`Py_ALWAYS_INLINE` macro does nothing.
It must be specified before the function return type. Usage::
@@ -812,12 +812,14 @@ available that support tracing of reference counts, debugging the memory
allocator, or low-level profiling of the main interpreter loop. Only the most
frequently used builds will be described in the remainder of this section.
-Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined produces
+.. c:macro:: Py_DEBUG
+
+Compiling the interpreter with the :c:macro:`!Py_DEBUG` macro defined produces
what is generally meant by :ref:`a debug build of Python <debug-build>`.
-:c:macro:`Py_DEBUG` is enabled in the Unix build by adding
+:c:macro:`!Py_DEBUG` is enabled in the Unix build by adding
:option:`--with-pydebug` to the :file:`./configure` command.
It is also implied by the presence of the
-not-Python-specific :c:macro:`_DEBUG` macro. When :c:macro:`Py_DEBUG` is enabled
+not-Python-specific :c:macro:`!_DEBUG` macro. When :c:macro:`!Py_DEBUG` is enabled
in the Unix build, compiler optimization is disabled.
In addition to the reference count debugging described below, extra checks are
@@ -832,4 +834,3 @@ after every statement run by the interpreter.)
Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source distribution
for more detailed information.
-