Skip to content

[3.14] GH-134774: fix 'Py_DEBUG': macro redefinition warnings for Windows debug builds #134791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix :c:macro:`Py_DEBUG` macro redefinition warnings on Windows debug builds.
Patch by Chris Eibl.
5 changes: 0 additions & 5 deletions PC/pyconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ WIN32 is still required for the locale module.
#endif
#endif /* Py_BUILD_CORE || Py_BUILD_CORE_BUILTIN || Py_BUILD_CORE_MODULE */

/* _DEBUG implies Py_DEBUG */
#ifdef _DEBUG
# define Py_DEBUG 1
#endif
Comment on lines -97 to -100
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this the one we want to keep? The earlier definition is the new one, to fix an issue with .lib selection.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, the rest of that change didn't get backported. This is fine


/* Define to 1 when compiling for experimental free-threaded builds */
#ifdef Py_GIL_DISABLED
/* We undefine if it was set to zero because all later checks are #ifdef.
Expand Down
Loading