From ae3f3f4e77b6e194439bcc448fb5c856f6eddb3b Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Thu, 17 Dec 2009 21:46:03 -0300 Subject: [PATCH] protect definition of INLINE and fix for MSVC (thanks to Julien Danjou) --- Cython/Compiler/Nodes.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index e6b00487..6c22ffa9 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -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*/ -- 2.26.2