Skip to content

fix: define _DEBUG macro to 1 on redefinition #5639

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 1 commit into from
May 7, 2025

Conversation

tobiasleibner
Copy link
Contributor

Description

The _DEBUG macro is currently defined without value on redefinition. According to the msvc documentation, the macro should be defined to 1.

Suggested changelog entry:

Properly define ``_DEBUG`` macro to ``1`` instead of defining it without value

According to the msvc documentation, the macro should be defined to 1:
https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros
@henryiii henryiii changed the title Define _DEBUG macro to 1 on redefinition fix: define _DEBUG macro to 1 on redefinition May 7, 2025
@henryiii henryiii merged commit a265a4c into pybind:master May 7, 2025
65 checks passed
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label May 7, 2025
b-pass pushed a commit to b-pass/pybind11 that referenced this pull request May 9, 2025
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants