summaryrefslogtreecommitdiff
path: root/Cython/Utility/ModuleSetupCode.c
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2013-08-04 15:57:30 +0200
committerStefan Behnel <stefan_ml@behnel.de>2013-08-04 15:57:30 +0200
commit61fdc053fe06b6057a2a107c247f26d661672ea0 (patch)
treeaf3194662e3d18f6940280ccf3675c9b1c0328d0 /Cython/Utility/ModuleSetupCode.c
parentc1a4f4148dcb8ed984ab3b1cfe117f194ce468ea (diff)
downloadcython-61fdc053fe06b6057a2a107c247f26d661672ea0.tar.gz
fix CPython version checking for tp_finalize()
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r--Cython/Utility/ModuleSetupCode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index c0c59f61d..8065ab9c5 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -128,6 +128,10 @@
#define Py_TPFLAGS_HAVE_VERSION_TAG 0
#endif
+#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
+ #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+
/* new Py3.3 unicode type (PEP 393) */
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
#define CYTHON_PEP393_ENABLED 1