mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
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 214562ed4d
)
---------
Co-authored-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
This commit is contained in:
parent
9643ce9019
commit
00cf2a621a
7 changed files with 13 additions and 10 deletions
|
@ -5,8 +5,6 @@
|
|||
*/
|
||||
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#include "pycore_compile.h" // _PyCompile_EnsureArrayLargeEnough
|
||||
|
@ -22,6 +20,8 @@ typedef _Py_SourceLocation location;
|
|||
|
||||
#include "clinic/instruction_sequence.c.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#undef SUCCESS
|
||||
#undef ERROR
|
||||
#define SUCCESS 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue