diff options
author | Hugo Beauzée-Luyssen <hugo@beauzee.fr> | 2025-03-02 09:56:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-02 09:56:49 (GMT) |
commit | 214562ed4ddc248b007f718ed92ebcc0c3669611 (patch) | |
tree | 23abec36fbc197868e07cb1173ff6d69969a4e37 /Python/codegen.c | |
parent | 051f0e5683fec3840fa7fc99723741dd2d701eae (diff) | |
download | cpython-214562ed4ddc248b007f718ed92ebcc0c3669611.zip cpython-214562ed4ddc248b007f718ed92ebcc0c3669611.tar.gz cpython-214562ed4ddc248b007f718ed92ebcc0c3669611.tar.bz2 |
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`.
Diffstat (limited to 'Python/codegen.c')
-rw-r--r-- | Python/codegen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/codegen.c b/Python/codegen.c index ecad8c2..8f1a298 100644 --- a/Python/codegen.c +++ b/Python/codegen.c @@ -12,8 +12,6 @@ * objects. */ -#include <stdbool.h> - #include "Python.h" #include "opcode.h" #include "pycore_ast.h" // _PyAST_GetDocString() @@ -32,6 +30,8 @@ #include "pycore_opcode_metadata.h" // _PyOpcode_opcode_metadata, _PyOpcode_num_popped/pushed #undef NEED_OPCODE_METADATA +#include <stdbool.h> + #define COMP_GENEXP 0 #define COMP_LISTCOMP 1 #define COMP_SETCOMP 2 |