mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
Postpone <stdbool.h> inclusion after Python.h (#130641)
Remove inclusions prior to Python.h. <stdbool.h> will cause <features.h> to be included before Python.h can define some macros to enable some additional features, causing multiple types not to be defined down the line.
This commit is contained in:
parent
fecf8bc8f2
commit
830f04b505
4 changed files with 7 additions and 8 deletions
|
@ -1,5 +1,3 @@
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "opcode.h"
|
#include "opcode.h"
|
||||||
|
|
||||||
|
@ -20,6 +18,8 @@
|
||||||
#include "pycore_uniqueid.h" // _PyObject_AssignUniqueId()
|
#include "pycore_uniqueid.h" // _PyObject_AssignUniqueId()
|
||||||
#include "clinic/codeobject.c.h"
|
#include "clinic/codeobject.c.h"
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#define INITIAL_SPECIALIZED_CODE_SIZE 16
|
#define INITIAL_SPECIALIZED_CODE_SIZE 16
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "pycore_code.h" // write_location_entry_start()
|
#include "pycore_code.h" // write_location_entry_start()
|
||||||
#include "pycore_compile.h"
|
#include "pycore_compile.h"
|
||||||
|
@ -8,6 +6,7 @@
|
||||||
#include "pycore_opcode_metadata.h" // is_pseudo_target, _PyOpcode_Caches
|
#include "pycore_opcode_metadata.h" // is_pseudo_target, _PyOpcode_Caches
|
||||||
#include "pycore_symtable.h" // _Py_SourceLocation
|
#include "pycore_symtable.h" // _Py_SourceLocation
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#define DEFAULT_CODE_SIZE 128
|
#define DEFAULT_CODE_SIZE 128
|
||||||
#define DEFAULT_LNOTAB_SIZE 16
|
#define DEFAULT_LNOTAB_SIZE 16
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "pycore_ast.h" // PyAST_Check, _PyAST_GetDocString()
|
#include "pycore_ast.h" // PyAST_Check, _PyAST_GetDocString()
|
||||||
#include "pycore_compile.h"
|
#include "pycore_compile.h"
|
||||||
|
@ -25,6 +23,8 @@
|
||||||
|
|
||||||
#include "cpython/code.h"
|
#include "cpython/code.h"
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#undef SUCCESS
|
#undef SUCCESS
|
||||||
#undef ERROR
|
#undef ERROR
|
||||||
#define SUCCESS 0
|
#define SUCCESS 0
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
/* TODO: Cull includes following phase split */
|
/* TODO: Cull includes following phase split */
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
|
|
||||||
#include "pycore_ast.h" // PyAST_mod2obj()
|
#include "pycore_ast.h" // PyAST_mod2obj()
|
||||||
|
@ -29,6 +27,8 @@
|
||||||
#include "errcode.h" // E_EOF
|
#include "errcode.h" // E_EOF
|
||||||
#include "marshal.h" // PyMarshal_ReadLongFromFile()
|
#include "marshal.h" // PyMarshal_ReadLongFromFile()
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#ifdef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
# include "malloc.h" // alloca()
|
# include "malloc.h" // alloca()
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue