Use the Python-specific Py_DEBUG
macro rather than _DEBUG
in Windows-related C code
#131942
Labels
extension-modules
C modules in the Modules dir
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
OS-windows
type-feature
A feature request or enhancement
Follow the discussion at #131799 (comment).
Currently, the Windows-related C code is mixed using the Python-specific
Py_DEBUG
macro and non-Python-specific_DEBUG
macro.The documentation said
_DEBUG
impliesPy_DEBUG
.And it is guaranteed by the following code on Windows.
cpython/PC/pyconfig.h.in
Lines 379 to 381 in 4940d96
All platform-non-specific code and Unix-specific code is using the Python-specific
Py_DEBUG
macro. It would be nice to usePy_DEBUG
in Windows-related C code either. It could improve the code readability and maintainability.Linked PRs
Py_DEBUG
macro rather than_DEBUG
in Windows-related C code #131944The text was updated successfully, but these errors were encountered: