2020-07-27 16:41:17 +08:00
|
|
|
diff --git a/c/call_python.c b/c/call_python.c
|
|
|
|
|
index d3d2e17..d291eb3 100644
|
|
|
|
|
--- a/c/call_python.c
|
|
|
|
|
+++ b/c/call_python.c
|
|
|
|
|
@@ -1,8 +1,10 @@
|
|
|
|
|
#if PY_VERSION_HEX >= 0x03080000
|
|
|
|
|
-# define HAVE_PYINTERPSTATE_GETDICT
|
2020-06-18 16:42:44 +08:00
|
|
|
+# define Py_BUILD_CORE
|
|
|
|
|
+/* for access to the fields of PyInterpreterState */
|
|
|
|
|
+# include "internal/pycore_pystate.h"
|
|
|
|
|
+# undef Py_BUILD_CORE
|
2020-07-27 16:41:17 +08:00
|
|
|
#endif
|
2020-06-18 16:42:44 +08:00
|
|
|
|
2020-07-27 16:41:17 +08:00
|
|
|
-
|
|
|
|
|
static PyObject *_current_interp_key(void)
|
2020-06-18 16:42:44 +08:00
|
|
|
{
|
2020-07-27 16:41:17 +08:00
|
|
|
PyInterpreterState *interp = PyThreadState_GET()->interp;
|
|
|
|
|
--
|
|
|
|
|
2.23.0
|
|
|
|
|
|