Skip to content

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

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
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

Choose a reason for hiding this comment

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

LGTM

Thanks for sorting this out.

@miss-islington
Copy link
Contributor

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
@encukou encukou deleted the no-stdbool branch February 25, 2022 08:25
@brettcannon
Copy link
Member

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

asvetlov pushed a commit that referenced this pull request 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants