diff options
author | Robert Bradshaw <robertwb@gmail.com> | 2015-08-13 22:14:52 -0700 |
---|---|---|
committer | Robert Bradshaw <robertwb@gmail.com> | 2015-08-13 22:14:52 -0700 |
commit | 25ec392a7ff723a5f87d76e8d69b1bf354fa95cf (patch) | |
tree | 1829e2bbee369cbef2b0c281dbf3a8e8cf3d093e /Cython/Utility/ModuleSetupCode.c | |
parent | e1901d138595fbb07162faf9e82f12659f65531f (diff) | |
download | cython-25ec392a7ff723a5f87d76e8d69b1bf354fa95cf.tar.gz |
Move "longintrepr.h" inclusion before any user includes.
This solves the issue reported by Volker Braun where conflicting
using aliases of uint64_t would result in compile time errors.
Unfortunately, this also means that it's always included if
CYTHON_USE_PYLONG_INTERNALS is set, but it's a short header.
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index 0bcf74e04..0ee350ca7 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -2,7 +2,7 @@ #include <stddef.h> /* For offsetof */ #ifndef offsetof -#define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) @@ -33,19 +33,22 @@ #endif #ifdef PYPY_VERSION -#define CYTHON_COMPILING_IN_PYPY 1 -#define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 #else -#define CYTHON_COMPILING_IN_PYPY 0 -#define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_PYPY 0 + #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 + #define CYTHON_USE_PYLONG_INTERNALS 1 +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) -#define Py_OptimizeFlag 0 + #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" |