Skip to content

Commit e1e4cf7

Browse files
authored
[3.11] gh-101100: Fix Py_DEBUG dangling Sphinx references (#115003) (#115141)
gh-101100: Fix Py_DEBUG dangling Sphinx references (#115003) (cherry picked from commit d0322fd)
1 parent 3aa4418 commit e1e4cf7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Doc/c-api/intro.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ complete listing.
148148
worse performances (due to increased code size for example). The compiler is
149149
usually smarter than the developer for the cost/benefit analysis.
150150

151-
If Python is :ref:`built in debug mode <debug-build>` (if the ``Py_DEBUG``
151+
If Python is :ref:`built in debug mode <debug-build>` (if the :c:macro:`Py_DEBUG`
152152
macro is defined), the :c:macro:`Py_ALWAYS_INLINE` macro does nothing.
153153

154154
It must be specified before the function return type. Usage::
@@ -812,12 +812,14 @@ available that support tracing of reference counts, debugging the memory
812812
allocator, or low-level profiling of the main interpreter loop. Only the most
813813
frequently used builds will be described in the remainder of this section.
814814

815-
Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined produces
815+
.. c:macro:: Py_DEBUG
816+
817+
Compiling the interpreter with the :c:macro:`!Py_DEBUG` macro defined produces
816818
what is generally meant by :ref:`a debug build of Python <debug-build>`.
817-
:c:macro:`Py_DEBUG` is enabled in the Unix build by adding
819+
:c:macro:`!Py_DEBUG` is enabled in the Unix build by adding
818820
:option:`--with-pydebug` to the :file:`./configure` command.
819821
It is also implied by the presence of the
820-
not-Python-specific :c:macro:`_DEBUG` macro. When :c:macro:`Py_DEBUG` is enabled
822+
not-Python-specific :c:macro:`!_DEBUG` macro. When :c:macro:`!Py_DEBUG` is enabled
821823
in the Unix build, compiler optimization is disabled.
822824

823825
In addition to the reference count debugging described below, extra checks are
@@ -832,4 +834,3 @@ after every statement run by the interpreter.)
832834

833835
Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source distribution
834836
for more detailed information.
835-

0 commit comments

Comments
 (0)