postpone <stdbool.h> inclusion after Python.h#130641
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 |
|
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. |
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