Skip to content
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

bpo-46748: Don't import <stdbool.h> in public headers #31553

Merged
merged 2 commits into from Feb 25, 2022

Conversation

encukou
Copy link
Member

@encukou encukou commented Feb 24, 2022

<stdbool.h> is the standard/modern way to define embedd/extends Python free to define bool, true and false, but there are existing applications that use slightly different redefinitions, which fail if the header is included.

It's OK to use stdbool outside the public headers, though.

https://bugs.python.org/issue46748

Automerge-Triggered-By: GH:encukou

Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

LGTM

Thanks for sorting this out.

@encukou encukou added DO-NOT-MERGE 🤖 automerge PR will be merged once it's been approved and all CI passed and removed DO-NOT-MERGE labels Feb 25, 2022
@miss-islington
Copy link
Contributor

miss-islington commented Feb 25, 2022

Sorry, I can't merge this PR. Reason: Base branch was modified. Review and try the merge again..

@encukou encukou merged commit 2c228a7 into python:main Feb 25, 2022
12 checks passed
@encukou encukou deleted the no-stdbool branch Feb 25, 2022
@brettcannon
Copy link
Member

brettcannon commented Feb 25, 2022

@encukou this seems to have broken s390x buildbots, e.g. https://buildbot.python.org/all/#/builders/509 .

asvetlov pushed a commit that referenced this issue Feb 26, 2022
<stdbool.h> is the standard/modern way to define embedd/extends Python free to define bool, true and false, but there are existing applications that use slightly different redefinitions, which fail if the header is included.

It's OK to use stdbool outside the public headers, though.

https://bugs.python.org/issue46748
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 automerge PR will be merged once it's been approved and all CI passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants