summaryrefslogtreecommitdiff
path: root/Cython/Utility/ModuleSetupCode.c
diff options
context:
space:
mode:
authorCharles Grunwald (Juntalis) <charles@grunwald.me>2013-04-11 02:41:23 -0700
committerCharles Grunwald (Juntalis) <charles@grunwald.me>2013-04-11 02:41:23 -0700
commit87b8a498e14ca6ccc9a72e5175365a1cfb799146 (patch)
treee4260fd55c502977791e96447e907a1e14de65e0 /Cython/Utility/ModuleSetupCode.c
parent332a5263e57295029328f860f8f610eaff7f1732 (diff)
downloadcython-87b8a498e14ca6ccc9a72e5175365a1cfb799146.tar.gz
Fix build for non-C99 compatible compilers
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r--Cython/Utility/ModuleSetupCode.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index 295307237..5bfefdde3 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -262,10 +262,23 @@
#define __Pyx_DOCSTR(n) (n)
#endif
+/* inline attribute */
+#ifndef CYTHON_INLINE
+ #if defined(__GNUC__)
+ #define CYTHON_INLINE __inline__
+ #elif defined(_MSC_VER)
+ #define CYTHON_INLINE __inline
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_INLINE inline
+ #else
+ #define CYTHON_INLINE
+ #endif
+#endif
+
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
-static inline float __PYX_NAN() {
+static CYTHON_INLINE float __PYX_NAN() {
/* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
a quiet NaN. */
@@ -277,19 +290,6 @@ static inline float __PYX_NAN() {
/////////////// UtilityFunctionPredeclarations.proto ///////////////
-/* inline attribute */
-#ifndef CYTHON_INLINE
- #if defined(__GNUC__)
- #define CYTHON_INLINE __inline__
- #elif defined(_MSC_VER)
- #define CYTHON_INLINE __inline
- #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define CYTHON_INLINE inline
- #else
- #define CYTHON_INLINE
- #endif
-#endif
-
/* unused attribute */
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)