On Dec 17, 2009, at 2:40 PM, Lisandro Dalcín wrote: > On Thu, Dec 17, 2009 at 12:25 PM, Julien Danjou <[email protected]> > wrote: >> This kills a compilation warning. >> >> Signed-off-by: Julien Danjou <[email protected]> >> --- >> Cython/Compiler/Nodes.py | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py >> index e6b0048..dfe94d6 100644 >> --- a/Cython/Compiler/Nodes.py >> +++ b/Cython/Compiler/Nodes.py >> @@ -4822,7 +4822,7 @@ utility_function_predeclarations = \ >> """ >> #ifdef __GNUC__ >> #define INLINE __inline__ >> -#elif _WIN32 >> +#elif defined(_WIN32) >> #define INLINE __inline >> #else >> #define INLINE >> -- >> 1.6.5.4 >> > > Mmm... What about the fix below? IIUC, __inline is a builtin keyword > for MSVC, but not for every other C compiler running on Windows... > Better safe than sorry... > > > $ hg diff Cython/Compiler/Nodes.py > diff -r d76177fc0796 Cython/Compiler/Nodes.py > --- a/Cython/Compiler/Nodes.py Thu Dec 17 09:32:44 2009 +0100 > +++ b/Cython/Compiler/Nodes.py Thu Dec 17 19:38:15 2009 -0300 > @@ -4820,9 +4820,9 @@ > > utility_function_predeclarations = \ > """ > -#ifdef __GNUC__ > +#if defined(__GNUC__) > #define INLINE __inline__ > -#elif _WIN32 > +#elif defined(_MSC_VER) > #define INLINE __inline > #else > #define INLINE
Good point, please push. Are there any other compilers that we should single out? We heavily use the assumption that inlined functions actually get inlined for optimization purposes. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
