cython-devel

changeset 2792:9918bc676467

protect definition of INLINE and fix for MSVC (thanks to Julien Danjou)
author Lisandro Dalcin <dalcinl@gmail.com>
date Thu Dec 17 21:46:03 2009 -0300 (2 years ago)
parents adcb695965d7
children 1a5be8d78c80
files Cython/Compiler/Nodes.py
line diff
1.1 --- a/Cython/Compiler/Nodes.py Thu Dec 17 20:48:31 2009 -0300 1.2 +++ b/Cython/Compiler/Nodes.py Thu Dec 17 21:46:03 2009 -0300 1.3 @@ -4820,12 +4820,14 @@ 1.4 1.5 utility_function_predeclarations = \ 1.6 """ 1.7 -#ifdef __GNUC__ 1.8 -#define INLINE __inline__ 1.9 -#elif _WIN32 1.10 -#define INLINE __inline 1.11 -#else 1.12 -#define INLINE 1.13 +#ifndef INLINE 1.14 + #if defined(__GNUC__) 1.15 + #define INLINE __inline__ 1.16 + #elif defined(_MSC_VER) 1.17 + #define INLINE __inline 1.18 + #else 1.19 + #define INLINE 1.20 + #endif 1.21 #endif 1.22 1.23 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*/