You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use the Python-specific Py_DEBUG macro rather than _DEBUG in Windows-related C code #131942
Compiling the interpreter with the Py_DEBUG macro defined produces what is generally meant by a debug build of Python. Py_DEBUG is enabled in the Unix build by adding --with-pydebug to the ./configure command. It is also implied by the presence of the not-Python-specific _DEBUG macro. When Py_DEBUG is enabled in the Unix build, compiler optimization is disabled.
And it is guaranteed by the following code on Windows.
All platform-non-specific code and Unix-specific code is using the Python-specific Py_DEBUG macro. It would be nice to use Py_DEBUG in Windows-related C code either. It could improve the code readability and maintainability.
Activity
picnixz commentedon Mar 31, 2025
cc @zooba
tanmayadmuthe commentedon Mar 31, 2025
picnixz commentedon Mar 31, 2025
@tanmayadmuthe Please avoid using AI-generated answers that do not help in the discussion.
gh-131942: Use the Python-specific `Py_DEBUG` macro rather than `_DEB…
pythongh-131942: Use the Python-specific `Py_DEBUG` macro rather than…
pythongh-131942: Use the Python-specific `Py_DEBUG` macro rather than…