summaryrefslogtreecommitdiffstats
path: root/Include
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 /Include
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 'Include')
-rw-r--r--Include/internal/pycore_ceval.h4
-rw-r--r--Include/internal/pycore_object.h4
-rw-r--r--Include/internal/pycore_pystate.h3
3 files changed, 6 insertions, 5 deletions
diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h
index 811aada..298018a 100644
--- a/Include/internal/pycore_ceval.h
+++ b/Include/internal/pycore_ceval.h
@@ -13,7 +13,7 @@ struct pyruntimestate;
struct _ceval_runtime_state;
struct _frame;
-#include "pycore_pystate.h" /* PyInterpreterState.eval_frame */
+#include "pycore_interp.h" /* PyInterpreterState.eval_frame */
extern void _Py_FinishPendingCalls(PyThreadState *tstate);
extern void _PyEval_InitRuntimeState(struct _ceval_runtime_state *);
@@ -50,7 +50,7 @@ extern PyObject *_PyEval_EvalCode(
PyObject *kwdefs, PyObject *closure,
PyObject *name, PyObject *qualname);
-extern int _PyEval_ThreadsInitialized(_PyRuntimeState *runtime);
+extern int _PyEval_ThreadsInitialized(struct pyruntimestate *runtime);
extern PyStatus _PyEval_InitGIL(PyThreadState *tstate);
extern void _PyEval_FiniGIL(PyThreadState *tstate);
diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h
index 5c3d3ca..7c0f24a 100644
--- a/Include/internal/pycore_object.h
+++ b/Include/internal/pycore_object.h
@@ -8,7 +8,9 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif
-#include "pycore_pystate.h" /* PyInterpreterState.gc */
+#include "pycore_gc.h" // _PyObject_GC_IS_TRACKED()
+#include "pycore_interp.h" // PyInterpreterState.gc
+#include "pycore_pystate.h" // _PyThreadState_GET()
PyAPI_FUNC(int) _PyType_CheckConsistency(PyTypeObject *type);
PyAPI_FUNC(int) _PyDict_CheckConsistency(PyObject *mp, int check_content);
diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h
index 748aa63..2e78378 100644
--- a/Include/internal/pycore_pystate.h
+++ b/Include/internal/pycore_pystate.h
@@ -8,8 +8,7 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif
-#include "pycore_interp.h" /* PyInterpreterState */
-#include "pycore_runtime.h" /* PyRuntimestate */
+#include "pycore_runtime.h" /* PyRuntimeState */
/* Check if the current thread is the main thread.