summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2016-07-31 09:30:31 +0200
committerStefan Behnel <stefan_ml@behnel.de>2016-07-31 09:30:31 +0200
commitf121eebde46e487d29dc2c22b4809e37c577e4cc (patch)
tree5a0384259d6755ba86228132eeac27e07e56cc06
parent602198567bd7fbef8f0f25ef080c8f3dcfaa14d6 (diff)
downloadcython-f121eebde46e487d29dc2c22b4809e37c577e4cc.tar.gz
fold CYTHON_USE_PYLONG_INTERNALS feature macro into the same initialisation section as the others
-rw-r--r--Cython/Utility/ModuleSetupCode.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index 356e9ff4a..dddad6962 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -43,6 +43,8 @@
#define CYTHON_USE_PYLIST_INTERNALS 0
#undef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
#undef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 1
#undef CYTHON_ASSUME_SAFE_MACROS
@@ -63,6 +65,12 @@
#elif !defined(CYTHON_USE_ASYNC_SLOTS)
#define CYTHON_USE_ASYNC_SLOTS 1
#endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
+ #define CYTHON_USE_PYLONG_INTERNALS 1
+ #endif
#ifndef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 1
#endif
@@ -83,9 +91,6 @@
#endif
#endif
-#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
- #define CYTHON_USE_PYLONG_INTERNALS 1
-#endif
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
/* These short defines can easily conflict with other code */