summaryrefslogtreecommitdiff
path: root/Cython/Utility/ModuleSetupCode.c
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2015-03-26 22:26:02 +0100
committerStefan Behnel <stefan_ml@behnel.de>2015-03-26 22:26:02 +0100
commit0897f26995248d5e678a7d9478aa13745665e3bd (patch)
tree40f7a538c13c213261b4c319f32fcfa3d1b2be14 /Cython/Utility/ModuleSetupCode.c
parent89fec0ac655e5e9b2be9a09eace5627e2916bdb3 (diff)
downloadcython-0897f26995248d5e678a7d9478aa13745665e3bd.tar.gz
extend PyLong optimisations to larger negative numbers, enable it also in Py2.7
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 ee190ef12..3b228819c 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -40,6 +40,10 @@
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
+#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#endif
+
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
#define Py_OptimizeFlag 0
#endif