protect definition of INLINE and fix for MSVC (thanks to Julien Danjou)
authorLisandro Dalcin <dalcinl@gmail.com>
Fri, 18 Dec 2009 00:46:03 +0000 (21:46 -0300)
committerLisandro Dalcin <dalcinl@gmail.com>
Fri, 18 Dec 2009 00:46:03 +0000 (21:46 -0300)
Cython/Compiler/Nodes.py

index e6b00487627784e71f92e67a22e311ad6272dfba..6c22ffa95e0f8512b456508d677c76845f5cd33c 100644 (file)
@@ -4820,12 +4820,14 @@ class FromImportStatNode(StatNode):
 
 utility_function_predeclarations = \
 """
-#ifdef __GNUC__
-#define INLINE __inline__
-#elif _WIN32
-#define INLINE __inline
-#else
-#define INLINE 
+#ifndef INLINE
+  #if defined(__GNUC__)
+    #define INLINE __inline__
+  #elif defined(_MSC_VER)
+    #define INLINE __inline
+  #else
+    #define INLINE 
+  #endif
 #endif
 
 typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/