Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Description
Follow the discussion at#131799 (comment).
Currently, the Windows-related C code is mixed using the Python-specificPy_DEBUG macro and non-Python-specific_DEBUG macro.
The documentation said_DEBUG impliesPy_DEBUG.
Py_DEBUG
Compiling the interpreter with the
Py_DEBUGmacro defined produces what is generally meant bya debug build of Python. Py_DEBUG is enabled in the Unix build by adding--with-pydebug to the./configurecommand. It is also implied by the presence of the not-Python-specific_DEBUGmacro. WhenPy_DEBUGis enabled in the Unix build, compiler optimization is disabled.
And it is guaranteed by the following code on Windows.
Lines 379 to 381 in4940d96
| #ifdef_DEBUG | |
| # definePy_DEBUG | |
| #endif |
All platform-non-specific code and Unix-specific code is using the Python-specificPy_DEBUG macro. It would be nice to usePy_DEBUG in Windows-related C code either. It could improve the code readability and maintainability.