-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
postpone <stdbool.h> inclusion after Python.h #130641
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
Conversation
stdbool.h will cause <features.h> to be included before Python.h can define some macros to enable some additional features, causing multiple types not to be defined down the line
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @chouquette for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, @chouquette and @vstinner, I could not cleanly backport this to
|
GH-130675 is a backport of this pull request to the 3.13 branch. |
Remove inclusions prior to Python.h. <stdbool.h> will cause <features.h> to be included before Python.h can define some macros to enable some additional features, causing multiple types not to be defined down the line. (cherry picked from commit 830f04b)
Postpone <stdbool.h> inclusion after Python.h (#130641) Remove inclusions prior to Python.h. <stdbool.h> will cause <features.h> to be included before Python.h can define some macros to enable some additional features, causing multiple types not to be defined down the line. (cherry picked from commit 830f04b) Co-authored-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
I noticed we still have a bunch of places where we Lines 1 to 4 in ddc27f9
cpython/Modules/_hashopenssl.c Lines 25 to 26 in ddc27f9
cpython/Parser/string_parser.c Lines 1 to 3 in ddc27f9
Lines 15 to 17 in ddc27f9
Lines 1 to 3 in ddc27f9
cpython/Python/instruction_sequence.c Lines 8 to 10 in ddc27f9
|
Disclaimer: I don't know the python code base at all My take on this is that it seems |
Follow-up: PR #130738. |
Remove inclusions prior to Python.h. <stdbool.h> will cause <features.h> to be included before Python.h can define some macros to enable some additional features, causing multiple types not to be defined down the line.
stdbool.h will cause <features.h> to be included before Python.h can define some macros to enable some additional features, causing multiple types not to be defined down the line
In my specific case, this was causing build failures when building python with
zig cc