@@ -826,21 +826,17 @@ frequently used builds will be described in the remainder of this section.
826826
827827 Compiling the interpreter with the :c:macro: `!Py_DEBUG ` macro defined produces
828828what is generally meant by :ref: `a debug build of Python <debug-build >`.
829- :c:macro: `!Py_DEBUG ` is enabled in the Unix build by adding
830- :option: `--with-pydebug ` to the :file: `./configure ` command.
831- It is also implied by the presence of the
832- not-Python-specific :c:macro: `!_DEBUG ` macro. When :c:macro: `!Py_DEBUG ` is enabled
833- in the Unix build, compiler optimization is disabled.
834829
835- .. note ::
836- On Windows, the :c:macro: ` !Py_DEBUG ` macro is not defined by default .
830+ On Unix, :c:macro: ` !Py_DEBUG ` can be enabled by adding :option: ` --with-pydebug `
831+ to the :file: ` ./configure ` command. This will also disable compiler optimization .
837832
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.
833+ On Windows, selecting a debug build (e.g., by passing the :option: `-d ` option to
834+ :file: `PCbuild/build.bat `) automatically enables :c:macro: `!Py_DEBUG `.
835+ Additionally, the presence of the not-Python-specific :c:macro: `!_DEBUG ` macro,
836+ when defined by the compiler, will also implicitly enable :c:macro: `!Py_DEBUG `.
841837
842838In addition to the reference count debugging described below, extra checks are
843- performed, see :ref: `Python Debug Build <debug-build >`.
839+ performed. See :ref: `Python Debug Build <debug-build >` for more details .
844840
845841Defining :c:macro: `Py_TRACE_REFS ` enables reference tracing
846842(see the :option: `configure --with-trace-refs option <--with-trace-refs> `).
0 commit comments