-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Ensure stdbool.h
is included after Python.h
#130740
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
Labels
build
The build process and cross-build
extension-modules
C modules in the Modules dir
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-bug
An unexpected behavior, bug, or error
Comments
picnixz
pushed a commit
that referenced
this issue
Mar 2, 2025
Move some `#include <stdbool.h>` after `#include "Python.h"` when `pyconfig.h` is not included first and when we are in a platform-agnostic context. This is to avoid having features defined by `stdbool.h` before those decided by `Python.h`.
picnixz
pushed a commit
to picnixz/cpython
that referenced
this issue
Mar 2, 2025
…hon#130738) Move some `#include <stdbool.h>` after `#include "Python.h"` when `pyconfig.h` is not included first and when we are in a platform-agnostic context. This is to avoid having features defined by `stdbool.h` before those decided by `Python.h`.
picnixz
added a commit
that referenced
this issue
Mar 3, 2025
…30738) (#130756) gh-130740: Move some `stdbool.h` includes after `Python.h` (#130738) Move some `#include <stdbool.h>` after `#include "Python.h"` when `pyconfig.h` is not included first and when we are in a platform-agnostic context. This is to avoid having features defined by `stdbool.h` before those decided by `Python.h` (this caused some build failures when compiling CPython with `zig cc`). (cherry-picked from commit 214562e) --------- Co-authored-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
picnixz
added a commit
that referenced
this issue
Mar 4, 2025
…30738) (#130757) gh-130740: Move some `stdbool.h` includes after `Python.h` (#130738) Move some `#include <stdbool.h>` after `#include "Python.h"` when `pyconfig.h` is not included first and when we are in a platform-agnostic context. This is to avoid having features defined by `stdbool.h` before those decided by `Python.h` (this caused some build failures when compiling CPython with `zig cc`). (cherry-picked from commit 214562e) --------- Co-authored-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
Can this be closed, are there any cases of this left? $ grep -RPzl '#include <stdbool.h>.*\n(?s:.*)#include <Python.h>' .
./configure I presume we can ignore it. |
seehwan
pushed a commit
to seehwan/cpython
that referenced
this issue
Apr 16, 2025
…hon#130738) Move some `#include <stdbool.h>` after `#include "Python.h"` when `pyconfig.h` is not included first and when we are in a platform-agnostic context. This is to avoid having features defined by `stdbool.h` before those decided by `Python.h`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
build
The build process and cross-build
extension-modules
C modules in the Modules dir
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-bug
An unexpected behavior, bug, or error
Bug report
Including
stdbool.h
beforePython.h
may cause build issues when usingzig cc
.See #130641 and #130641 (comment).
Linked PRs
stdbool.h
includes afterPython.h
#130738stdbool.h
includes afterPython.h
(#130738) #130756stdbool.h
includes afterPython.h
(#130738) #130757The text was updated successfully, but these errors were encountered: