summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-14 12:26:24 (GMT)
committerGitHub <noreply@github.com>2020-04-14 12:26:24 (GMT)
commit4a3fe0835310643193ea45529ab0fb45c5f8f2fd (patch)
tree6d112c3be1763e9185f805d19581347d1fc332ee /Python
parent8ef875028a3644a329c87ce420a73793e315143f (diff)
downloadcpython-4a3fe0835310643193ea45529ab0fb45c5f8f2fd.zip
cpython-4a3fe0835310643193ea45529ab0fb45c5f8f2fd.tar.gz
cpython-4a3fe0835310643193ea45529ab0fb45c5f8f2fd.tar.bz2
bpo-40268: Include explicitly pycore_interp.h (GH-19505)
pycore_pystate.h no longer includes pycore_interp.h: it's now included explicitly in files accessing PyInterpreterState.
Diffstat (limited to 'Python')
-rw-r--r--Python/_warnings.c1
-rw-r--r--Python/codecs.c1
-rw-r--r--Python/dynload_shlib.c1
-rw-r--r--Python/import.c1
-rw-r--r--Python/initconfig.c1
-rw-r--r--Python/preconfig.c7
-rw-r--r--Python/sysmodule.c4
-rw-r--r--Python/thread_nt.h1
-rw-r--r--Python/thread_pthread.h1
9 files changed, 14 insertions, 4 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index e4dfb73..d005f12 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -1,5 +1,6 @@
#include "Python.h"
#include "pycore_initconfig.h"
+#include "pycore_interp.h" // PyInterpreterState.warnings
#include "pycore_pyerrors.h"
#include "pycore_pystate.h"
#include "frameobject.h"
diff --git a/Python/codecs.c b/Python/codecs.c
index 7b35ded..6691985 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -9,6 +9,7 @@ Copyright (c) Corporation for National Research Initiatives.
------------------------------------------------------------------------ */
#include "Python.h"
+#include "pycore_interp.h" // PyInterpreterState.codec_search_path
#include "pycore_pystate.h"
#include "ucnhash.h"
#include <ctype.h>
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c
index 3603871..223e0d0 100644
--- a/Python/dynload_shlib.c
+++ b/Python/dynload_shlib.c
@@ -2,6 +2,7 @@
/* Support for dynamic loading of extension modules */
#include "Python.h"
+#include "pycore_interp.h" // _PyInterpreterState.dlopenflags
#include "pycore_pystate.h" // _PyInterpreterState_GET_UNSAFE()
#include "importdl.h"
diff --git a/Python/import.c b/Python/import.c
index d79fa18..3bf8fe0 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -9,6 +9,7 @@
#include "pycore_pyhash.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
+#include "pycore_interp.h" // _PyInterpreterState_ClearModules()
#include "pycore_pystate.h"
#include "pycore_sysmodule.h"
#include "errcode.h"
diff --git a/Python/initconfig.c b/Python/initconfig.c
index e63d6f6..43e0ccb 100644
--- a/Python/initconfig.c
+++ b/Python/initconfig.c
@@ -3,6 +3,7 @@
#include "pycore_fileutils.h"
#include "pycore_getopt.h"
#include "pycore_initconfig.h"
+#include "pycore_interp.h" // _PyInterpreterState.runtime
#include "pycore_pathconfig.h"
#include "pycore_pyerrors.h"
#include "pycore_pylifecycle.h"
diff --git a/Python/preconfig.c b/Python/preconfig.c
index 89a6227..db32875 100644
--- a/Python/preconfig.c
+++ b/Python/preconfig.c
@@ -1,8 +1,9 @@
#include "Python.h"
-#include "pycore_initconfig.h"
#include "pycore_getopt.h"
-#include "pycore_pystate.h" /* _PyRuntime_Initialize() */
-#include <locale.h> /* setlocale() */
+#include "pycore_initconfig.h"
+#include "pycore_pymem.h" // _PyMem_GetAllocatorName()
+#include "pycore_pystate.h" // _PyRuntime_Initialize()
+#include <locale.h> // setlocale()
#define DECODE_LOCALE_ERR(NAME, LEN) \
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index fd0a9c0..814e4ab 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -17,7 +17,9 @@ Data members:
#include "Python.h"
#include "code.h"
#include "frameobject.h"
-#include "pycore_ceval.h"
+#include "pycore_ceval.h" // _Py_RecursionLimitLowerWaterMark()
+#include "pycore_pystate.h" // _PyThreadState_GET()
+#include "pycore_tupleobject.h"
#include "pycore_initconfig.h"
#include "pycore_pathconfig.h"
#include "pycore_pyerrors.h"
diff --git a/Python/thread_nt.h b/Python/thread_nt.h
index 23d585c..e4bd0f7 100644
--- a/Python/thread_nt.h
+++ b/Python/thread_nt.h
@@ -1,3 +1,4 @@
+#include "pycore_interp.h" // _PyInterpreterState.pythread_stacksize
/* This code implemented by Dag.Gruneau@elsa.preseco.comm.se */
/* Fast NonRecursiveMutex support by Yakov Markovitch, markovitch@iso.ru */
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index e3497e7..440d845 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -1,3 +1,4 @@
+#include "pycore_interp.h" // _PyInterpreterState.pythread_stacksize
/* Posix threads interface */