summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/Python-ast.c11
-rw-r--r--Python/ast.c5
-rw-r--r--Python/ast_opt.c5
-rw-r--r--Python/codecs.c3
-rw-r--r--Python/compile.c8
-rw-r--r--Python/dtoa.c1
-rw-r--r--Python/errors.c3
-rw-r--r--Python/importdl.c10
-rw-r--r--Python/marshal.c10
-rw-r--r--Python/perf_jit_trampoline.c1
-rw-r--r--Python/perf_trampoline.c1
-rw-r--r--Python/qsbr.c6
-rw-r--r--Python/symtable.c5
-rw-r--r--Python/thread.c3
14 files changed, 46 insertions, 26 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 638e3f6..98dcdc4 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -3,15 +3,16 @@
#include "Python.h"
#include "pycore_ast.h"
#include "pycore_ast_state.h" // struct ast_state
-#include "pycore_ceval.h" // _Py_EnterRecursiveCall
+#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
#include "pycore_lock.h" // _PyOnceFlag
-#include "pycore_interp.h" // _PyInterpreterState.ast
#include "pycore_modsupport.h" // _PyArg_NoPositional()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
-#include "pycore_setobject.h" // _PySet_NextEntry(), _PySet_Update()
+#include "pycore_runtime.h" // _Py_ID()
+#include "pycore_setobject.h" // _PySet_NextEntry()
#include "pycore_unionobject.h" // _Py_union_type_or
-#include "structmember.h"
-#include <stddef.h>
+
+#include <stddef.h> // offsetof()
+
// Forward declaration
static int init_types(void *arg);
diff --git a/Python/ast.c b/Python/ast.c
index 597df5b..7ee8843 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -5,9 +5,10 @@
#include "Python.h"
#include "pycore_ast.h" // asdl_stmt_seq
#include "pycore_pystate.h" // _PyThreadState_GET()
+#include "pycore_unicodeobject.h" // _PyUnicode_EqualToASCIIString()
+
+#include <stdbool.h> // bool
-#include <assert.h>
-#include <stdbool.h>
#define ENTER_RECURSIVE() \
if (Py_EnterRecursiveCall(" during compilation")) { \
diff --git a/Python/ast_opt.c b/Python/ast_opt.c
index 2c6e168..1241445 100644
--- a/Python/ast_opt.c
+++ b/Python/ast_opt.c
@@ -2,9 +2,8 @@
#include "Python.h"
#include "pycore_ast.h" // _PyAST_GetDocString()
#include "pycore_format.h" // F_LJUST
-#include "pycore_long.h" // _PyLong
-#include "pycore_pystate.h" // _PyThreadState_GET()
-#include "pycore_setobject.h" // _PySet_NextEntry()
+#include "pycore_runtime.h" // _Py_STR()
+#include "pycore_unicodeobject.h" // _PyUnicode_EqualToASCIIString()
typedef struct {
diff --git a/Python/codecs.c b/Python/codecs.c
index 2453929..51f4beb 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -11,11 +11,12 @@ Copyright (c) Corporation for National Research Initiatives.
#include "Python.h"
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_interp.h" // PyInterpreterState.codec_search_path
-#include "pycore_lock.h" // PyMutex
#include "pycore_pyerrors.h" // _PyErr_FormatNote()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
+#include "pycore_runtime.h" // _Py_ID()
#include "pycore_ucnhash.h" // _PyUnicode_Name_CAPI
+
static const char *codecs_builtin_error_handlers[] = {
"strict", "ignore", "replace",
"xmlcharrefreplace", "backslashreplace", "namereplace",
diff --git a/Python/compile.c b/Python/compile.c
index cd68b89..a52183e 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -15,16 +15,20 @@
*/
#include "Python.h"
-#include "pycore_ast.h" // PyAST_Check, _PyAST_GetDocString()
+#include "pycore_ast.h" // PyAST_Check()
+#include "pycore_code.h" // _PyCode_GetFreevars()
#include "pycore_compile.h"
-#include "pycore_flowgraph.h"
+#include "pycore_flowgraph.h" // _PyCfg_FromInstructionSequence()
#include "pycore_pystate.h" // _Py_GetConfig()
+#include "pycore_runtime.h" // _Py_ID()
#include "pycore_setobject.h" // _PySet_NextEntry()
+#include "pycore_unicodeobject.h" // _PyUnicode_EqualToASCIIString()
#include "cpython/code.h"
#include <stdbool.h>
+
#undef SUCCESS
#undef ERROR
#define SUCCESS 0
diff --git a/Python/dtoa.c b/Python/dtoa.c
index 61d776d..3de1503 100644
--- a/Python/dtoa.c
+++ b/Python/dtoa.c
@@ -119,6 +119,7 @@
#include "Python.h"
#include "pycore_dtoa.h" // _PY_SHORT_FLOAT_REPR
+#include "pycore_interp_structs.h"// struct Bigint
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include <stdlib.h> // exit()
diff --git a/Python/errors.c b/Python/errors.c
index bf48c10..d2f3312 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -7,9 +7,11 @@
#include "pycore_initconfig.h" // _PyStatus_ERR()
#include "pycore_pyerrors.h" // _PyErr_Format()
#include "pycore_pystate.h" // _PyThreadState_GET()
+#include "pycore_runtime.h" // _Py_ID()
#include "pycore_structseq.h" // _PyStructSequence_FiniBuiltin()
#include "pycore_sysmodule.h" // _PySys_GetOptionalAttr()
#include "pycore_traceback.h" // _PyTraceBack_FromFrame()
+#include "pycore_unicodeobject.h" // _PyUnicode_Equal()
#ifdef MS_WINDOWS
# include <windows.h>
@@ -17,6 +19,7 @@
# include <stdlib.h> // _sys_nerr
#endif
+
/* Forward declarations */
static PyObject *
_PyErr_FormatV(PyThreadState *tstate, PyObject *exception,
diff --git a/Python/importdl.c b/Python/importdl.c
index 996ca7e..87c4489 100644
--- a/Python/importdl.c
+++ b/Python/importdl.c
@@ -2,13 +2,13 @@
/* Support for dynamic loading of extension modules */
#include "Python.h"
-#include "pycore_call.h"
-#include "pycore_import.h"
+#include "pycore_call.h" // _PyObject_CallMethod()
+#include "pycore_import.h" // _PyImport_SwapPackageContext()
+#include "pycore_importdl.h" // struct _Py_ext_module_loader_info
+#include "pycore_moduleobject.h" // _PyModule_GetDef()
#include "pycore_pyerrors.h" // _PyErr_FormatFromCause()
-#include "pycore_pystate.h"
-#include "pycore_runtime.h"
+#include "pycore_runtime.h" // _Py_ID()
-#include "pycore_importdl.h"
/* ./configure sets HAVE_DYNAMIC_LOADING if dynamic loading of modules is
supported on this platform. configure will then compile and link in one
diff --git a/Python/marshal.c b/Python/marshal.c
index cf70116..b39c1a5 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -9,17 +9,19 @@
#include "Python.h"
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_code.h" // _PyCode_New()
-#include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION()
#include "pycore_hashtable.h" // _Py_hashtable_t
-#include "pycore_long.h" // _PyLong_DigitCount
-#include "pycore_setobject.h" // _PySet_NextEntry()
-#include "marshal.h" // Py_MARSHAL_VERSION
+#include "pycore_long.h" // _PyLong_IsZero()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
+#include "pycore_setobject.h" // _PySet_NextEntryRef()
+#include "pycore_unicodeobject.h" // _PyUnicode_InternImmortal()
+
+#include "marshal.h" // Py_MARSHAL_VERSION
#ifdef __APPLE__
# include "TargetConditionals.h"
#endif /* __APPLE__ */
+
/*[clinic input]
module marshal
[clinic start generated code]*/
diff --git a/Python/perf_jit_trampoline.c b/Python/perf_jit_trampoline.c
index 0a89459..1211e0e 100644
--- a/Python/perf_jit_trampoline.c
+++ b/Python/perf_jit_trampoline.c
@@ -2,6 +2,7 @@
#include "pycore_ceval.h" // _PyPerf_Callbacks
#include "pycore_frame.h"
#include "pycore_interp.h"
+#include "pycore_runtime.h" // _PyRuntime
#ifdef PY_HAVE_PERF_TRAMPOLINE
diff --git a/Python/perf_trampoline.c b/Python/perf_trampoline.c
index ad077dc..a6a32b9 100644
--- a/Python/perf_trampoline.c
+++ b/Python/perf_trampoline.c
@@ -133,6 +133,7 @@ any DWARF information available for them).
#include "pycore_ceval.h" // _PyPerf_Callbacks
#include "pycore_frame.h"
#include "pycore_interp.h"
+#include "pycore_runtime.h" // _PyRuntime
#ifdef PY_HAVE_PERF_TRAMPOLINE
diff --git a/Python/qsbr.c b/Python/qsbr.c
index 862b2e5..bf34fb2 100644
--- a/Python/qsbr.c
+++ b/Python/qsbr.c
@@ -32,10 +32,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "Python.h"
-#include "pycore_initconfig.h" // _PyStatus_NO_MEMORY()
-#include "pycore_lock.h" // PyMutex_Lock()
-#include "pycore_qsbr.h"
+#include "pycore_interp.h" // PyInterpreterState
#include "pycore_pystate.h" // _PyThreadState_GET()
+#include "pycore_qsbr.h"
+#include "pycore_tstate.h" // _PyThreadStateImpl
// Starting size of the array of qsbr thread states
diff --git a/Python/symtable.c b/Python/symtable.c
index 4d6384f..9e2c0fb 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -2,7 +2,12 @@
#include "pycore_ast.h" // stmt_ty
#include "pycore_parser.h" // _PyParser_ASTFromString()
#include "pycore_pystate.h" // _PyThreadState_GET()
+#include "pycore_runtime.h" // _Py_ID()
#include "pycore_symtable.h" // PySTEntryObject
+#include "pycore_unicodeobject.h" // _PyUnicode_EqualToASCIIString()
+
+#include <stddef.h> // offsetof()
+
// Set this to 1 to dump all symtables to stdout for debugging
#define _PY_DUMP_SYMTABLE 0
diff --git a/Python/thread.c b/Python/thread.c
index b31d1dc..4ff5f11 100644
--- a/Python/thread.c
+++ b/Python/thread.c
@@ -8,8 +8,9 @@
#include "Python.h"
#include "pycore_ceval.h" // _PyEval_MakePendingCalls()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
-#include "pycore_structseq.h" // _PyStructSequence_FiniBuiltin()
#include "pycore_pythread.h" // _POSIX_THREADS
+#include "pycore_runtime.h" // _PyRuntime
+#include "pycore_structseq.h" // _PyStructSequence_FiniBuiltin()
#ifndef DONT_HAVE_STDIO_H
# include <stdio.h>