Skip to content

Commit 6a3dfb7

Browse files
committed
backport
1 parent 6486103 commit 6a3dfb7

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

Objects/codeobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <stdbool.h>
2-
31
#include "Python.h"
42
#include "opcode.h"
53
#include "structmember.h" // PyMemberDef
@@ -11,6 +9,8 @@
119
#include "pycore_tuple.h" // _PyTuple_ITEMS()
1210
#include "clinic/codeobject.c.h"
1311

12+
#include <stdbool.h>
13+
1414
static PyObject* code_repr(PyCodeObject *co);
1515

1616
static const char *

Python/assemble.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
#include <stdbool.h>
2-
31
#include "Python.h"
42
#include "pycore_code.h" // write_location_entry_start()
53
#include "pycore_compile.h"
64
#include "pycore_opcode.h" // _PyOpcode_Caches[] and opcode category macros
75
#include "pycore_pymem.h" // _PyMem_IsPtrFreed()
86

7+
#include <stdbool.h>
98

109
#define DEFAULT_CODE_SIZE 128
1110
#define DEFAULT_LNOTAB_SIZE 16

Python/compile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
* objects.
2222
*/
2323

24-
#include <stdbool.h>
25-
2624
#include "Python.h"
2725
#include "pycore_ast.h" // _PyAST_GetDocString()
2826
#define NEED_OPCODE_TABLES
@@ -38,6 +36,8 @@
3836

3937
#include "opcode_metadata.h" // _PyOpcode_opcode_metadata, _PyOpcode_num_popped/pushed
4038

39+
#include <stdbool.h>
40+
4141
#define DEFAULT_CODE_SIZE 128
4242
#define DEFAULT_LNOTAB_SIZE 16
4343
#define DEFAULT_CNOTAB_SIZE 32

Python/pythonrun.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
/* TODO: Cull includes following phase split */
1010

11-
#include <stdbool.h>
12-
1311
#include "Python.h"
1412

1513
#include "pycore_ast.h" // PyAST_mod2obj
@@ -27,6 +25,8 @@
2725
#include "errcode.h" // E_EOF
2826
#include "marshal.h" // PyMarshal_ReadLongFromFile()
2927

28+
#include <stdbool.h>
29+
3030
#ifdef MS_WINDOWS
3131
# include "malloc.h" // alloca()
3232
#endif

0 commit comments

Comments
 (0)