summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2021-04-20 18:32:14 +0200
committerStefan Behnel <stefan_ml@behnel.de>2021-04-20 18:32:14 +0200
commit0534584360feb88d168402f1677a7f3afdf832c8 (patch)
tree4e7784bdbf52750ca1b2d8af2537e0a97fff92fe
parent184146d9b4aeb1f4eaba898f71369bcdc4245776 (diff)
downloadcython-0534584360feb88d168402f1677a7f3afdf832c8.tar.gz
Fix version guard: PyImport_GetModule() was added in Py3.7.
-rw-r--r--Cython/Utility/ExtensionTypes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utility/ExtensionTypes.c b/Cython/Utility/ExtensionTypes.c
index 2b759aac7..04d95a4d4 100644
--- a/Cython/Utility/ExtensionTypes.c
+++ b/Cython/Utility/ExtensionTypes.c
@@ -75,7 +75,7 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
PyObject *ret, *py_status;
int gc_was_enabled;
PyObject *gc = NULL;
- #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x070304
+ #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
// https://foss.heptapod.net/pypy/pypy/-/issues/3385
gc = PyImport_GetModule(PYUNICODE("gc"));
#endif