python-cffi/potential-fix-for-Py-3.8.patch

14 lines
413 B
Diff
Raw Normal View History

2020-06-18 16:42:44 +08:00
diff -Naur a/c/call_python.c b/c/call_python.c
--- a/c/call_python.c 2020-06-18 15:00:52.843000000 +0800
+++ b/c/call_python.c 2020-06-18 15:05:11.254000000 +0800
@@ -1,3 +1,9 @@
+#if PY_VERSION_HEX >= 0x03080000
+# define Py_BUILD_CORE
+/* for access to the fields of PyInterpreterState */
+# include "internal/pycore_pystate.h"
+# undef Py_BUILD_CORE
+#endif
static PyObject *_get_interpstate_dict(void)
{