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.
diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c
index e2bb14e..9853699 100644
--- a/Modules/_threadmodule.c
+++ b/Modules/_threadmodule.c
@@ -4,9 +4,10 @@
#include "Python.h"
#include "pycore_pylifecycle.h"
+#include "pycore_interp.h" // _PyInterpreterState.num_threads
#include "pycore_pystate.h"
-#include "structmember.h" /* offsetof */
#include "pythread.h"
+#include <stddef.h> // offsetof()
static PyObject *ThreadError;
static PyObject *str_dict;
diff --git a/Modules/main.c b/Modules/main.c
index 00a0fc3..a9de70b 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -2,6 +2,7 @@
#include "Python.h"
#include "pycore_initconfig.h"
+#include "pycore_interp.h" // _PyInterpreterState.sysdict
#include "pycore_pathconfig.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"