Skip to content

Commit 004e6ec

Browse files
committed
Add a note to Py_DEBUG in docs
1 parent 28db045 commit 004e6ec

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Doc/c-api/intro.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,13 @@ It is also implied by the presence of the
832832
not-Python-specific :c:macro:`!_DEBUG` macro. When :c:macro:`!Py_DEBUG` is enabled
833833
in the Unix build, compiler optimization is disabled.
834834

835+
.. note::
836+
On Windows, the :c:macro:`!Py_DEBUG` macro is not defined by default.
837+
838+
The :option:`--with-pydebug` option is not available on Windows. Instead, the
839+
not-Python-specific :c:macro:`!_DEBUG` macro can be defined by the compiler
840+
options and that will enable the :c:macro:`!Py_DEBUG` macro.
841+
835842
In addition to the reference count debugging described below, extra checks are
836843
performed, see :ref:`Python Debug Build <debug-build>`.
837844

0 commit comments

Comments
 (0)