summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>2025-03-04 09:38:24 (GMT)
committerGitHub <noreply@github.com>2025-03-04 09:38:24 (GMT)
commit7ce5f1598186ef652246aefbea498f2dd4f3dcfd (patch)
treed2557e106d2bcc0a992e400928ef623b06d6bb67 /Python/pythonrun.c
parent519dec97e726d190e1c5c9a5ecf12b27e3e5e1f4 (diff)
downloadcpython-7ce5f1598186ef652246aefbea498f2dd4f3dcfd.zip
cpython-7ce5f1598186ef652246aefbea498f2dd4f3dcfd.tar.gz
cpython-7ce5f1598186ef652246aefbea498f2dd4f3dcfd.tar.bz2
[3.12] gh-130740: Move some `stdbool.h` includes after `Python.h` (#130738) (#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 214562ed4ddc248b007f718ed92ebcc0c3669611) --------- Co-authored-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index ac71e73..89287ba 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -8,8 +8,6 @@
/* TODO: Cull includes following phase split */
-#include <stdbool.h>
-
#include "Python.h"
#include "pycore_ast.h" // PyAST_mod2obj
@@ -27,6 +25,8 @@
#include "errcode.h" // E_EOF
#include "marshal.h" // PyMarshal_ReadLongFromFile()
+#include <stdbool.h>
+
#ifdef MS_WINDOWS
# include "malloc.h" // alloca()
#endif