summaryrefslogtreecommitdiff
path: root/c/call_python.c
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2019-02-25 08:52:59 +0100
committerArmin Rigo <arigo@tunes.org>2019-02-25 08:52:59 +0100
commita694ab480d1608d970cb73936909771b3ffeb16a (patch)
treee49e2a6e5f01ed0b655095690467bd94d04a0c92 /c/call_python.c
parentfd5a3264f21cd3e85d326f5387cb5d9b370ebe80 (diff)
downloadcffi-a694ab480d1608d970cb73936909771b3ffeb16a.tar.gz
potential fix for Py 3.8
Diffstat (limited to 'c/call_python.c')
-rw-r--r--c/call_python.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/c/call_python.c b/c/call_python.c
index b41042b..8fdcb90 100644
--- a/c/call_python.c
+++ b/c/call_python.c
@@ -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)
{