summaryrefslogtreecommitdiff
path: root/Cython/Utility/ModuleSetupCode.c
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2013-04-06 22:30:13 +0200
committerStefan Behnel <stefan_ml@behnel.de>2013-04-06 22:30:13 +0200
commitb1f10fa2c1bbb0a076807a9f391204c6a997ba9a (patch)
treee1c99d8f59a4d060bbe110232f6879bc9ad49cd7 /Cython/Utility/ModuleSetupCode.c
parent2a02485ea8af0b13526052b3c53601cc5edbabb2 (diff)
downloadcython-b1f10fa2c1bbb0a076807a9f391204c6a997ba9a.tar.gz
enable Py_TPFLAGS_HAVE_VERSION_TAG on extension types by default (also in Py2) and provide 'type_version_tag' option to disable it
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 58e761f30..e28844ccd 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -124,6 +124,10 @@
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
+#if PY_VERSION_HEX < 0x02060000
+ #define Py_TPFLAGS_HAVE_VERSION_TAG 0
+#endif
+
/* new Py3.3 unicode type (PEP 393) */
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
#define CYTHON_PEP393_ENABLED 1