Skip to content

Commit fd8eb48

Browse files
smontanaromiss-islington
authored andcommitted
pythongh-101100: Fix Py_DEBUG dangling Sphinx references (pythonGH-115003)
(cherry picked from commit d0322fd) Co-authored-by: Skip Montanaro <[email protected]>
1 parent 060c3ed commit fd8eb48

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
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-

Doc/library/test.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,9 @@ The :mod:`test.support` module defines the following constants:
324324

325325
.. data:: Py_DEBUG
326326

327-
True if Python is built with the :c:macro:`Py_DEBUG` macro defined: if
328-
Python is :ref:`built in debug mode <debug-build>`
329-
(:option:`./configure --with-pydebug <--with-pydebug>`).
327+
True if Python was built with the :c:macro:`Py_DEBUG` macro
328+
defined, that is, if
329+
Python was :ref:`built in debug mode <debug-build>`.
330330

331331
.. versionadded:: 3.12
332332

0 commit comments

Comments
 (0)