summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-14 15:52:15 (GMT)
committerGitHub <noreply@github.com>2020-04-14 15:52:15 (GMT)
commite5014be0497d06d78343623588a80f491a6f7b74 (patch)
treea8bbd18a39f6567115adb3089d1d9758c3e4690d /Modules
parente1945307d36849f8be8937144cf3dd6ebab6274c (diff)
downloadcpython-e5014be0497d06d78343623588a80f491a6f7b74.zip
cpython-e5014be0497d06d78343623588a80f491a6f7b74.tar.gz
cpython-e5014be0497d06d78343623588a80f491a6f7b74.tar.bz2
bpo-40268: Remove a few pycore_pystate.h includes (GH-19510)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_functoolsmodule.c2
-rw-r--r--Modules/_io/bufferedio.c1
-rw-r--r--Modules/_io/textio.c3
-rw-r--r--Modules/_threadmodule.c2
-rw-r--r--Modules/gcmodule.c7
-rw-r--r--Modules/getpath.c5
-rw-r--r--Modules/main.c2
-rw-r--r--Modules/posixmodule.c2
-rw-r--r--Modules/signalmodule.c2
9 files changed, 13 insertions, 13 deletions
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index 2f1b47a..d9536bb 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -1,6 +1,6 @@
#include "Python.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_tupleobject.h"
#include "structmember.h"
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index 6e76db4..4ec42eb 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -10,7 +10,6 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_object.h"
-#include "pycore_pystate.h"
#include "structmember.h"
#include "pythread.h"
#include "_iomodule.h"
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 95b023d..9e33c1e 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -8,8 +8,9 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
+#include "pycore_interp.h" // PyInterpreterState.fs_codec
#include "pycore_object.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "structmember.h"
#include "_iomodule.h"
diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c
index 5636140..8ff0669 100644
--- a/Modules/_threadmodule.c
+++ b/Modules/_threadmodule.c
@@ -5,7 +5,7 @@
#include "Python.h"
#include "pycore_pylifecycle.h"
#include "pycore_interp.h" // _PyInterpreterState.num_threads
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_Init()
#include "pythread.h"
#include <stddef.h> // offsetof()
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 1754182..281ab33 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -26,13 +26,14 @@
#include "Python.h"
#include "pycore_context.h"
#include "pycore_initconfig.h"
+#include "pycore_interp.h" // PyInterpreterState.gc
#include "pycore_object.h"
#include "pycore_pyerrors.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
-#include "frameobject.h" /* for PyFrame_ClearFreeList */
+#include "frameobject.h" // PyFrame_ClearFreeList
#include "pydtrace.h"
-#include "pytime.h" /* for _PyTime_GetMonotonicClock() */
+#include "pytime.h" // _PyTime_GetMonotonicClock()
typedef struct _gc_runtime_state GCState;
diff --git a/Modules/getpath.c b/Modules/getpath.c
index e97ea8b..1dd8dd0 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -1,11 +1,10 @@
/* Return the initial module search path. */
#include "Python.h"
-#include "pycore_initconfig.h"
-#include "osdefs.h"
#include "pycore_fileutils.h"
+#include "pycore_initconfig.h"
#include "pycore_pathconfig.h"
-#include "pycore_pystate.h"
+#include "osdefs.h"
#include <sys/types.h>
#include <string.h>
diff --git a/Modules/main.c b/Modules/main.c
index fb24c6c..fa9c6b4 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -6,7 +6,7 @@
#include "pycore_pathconfig.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyInterpreterState_GET()
/* Includes for exit_sigint() */
#include <stdio.h> /* perror() */
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 2d603d1..692dda3 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -37,7 +37,7 @@
#include "pycore_ceval.h" /* _PyEval_ReInitThreads() */
#include "pycore_import.h" /* _PyImport_ReInitLock() */
-#include "pycore_pystate.h" /* _PyRuntime */
+#include "pycore_pystate.h" /* _PyInterpreterState_GET() */
#include "pythread.h"
#include "structmember.h"
#ifndef MS_WINDOWS
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index ceb986b..69d69ac 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -8,7 +8,7 @@
#include "pycore_call.h"
#include "pycore_ceval.h"
#include "pycore_pyerrors.h"
-#include "pycore_pystate.h"
+#include "pycore_pystate.h" // _PyThreadState_GET()
#ifndef MS_WINDOWS
#include "posixmodule.h"