From 2c0f9f8cee2316eb80f1aac46ff7b193743337cb Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Tue, 8 Feb 2011 11:08:53 +0900 Subject: BUG: fix inline definition so that it still inlines in gcc -ansi mode. --- numpy/core/include/numpy/npy_common.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'numpy') diff --git a/numpy/core/include/numpy/npy_common.h b/numpy/core/include/numpy/npy_common.h index 0f0b6137b..145fe2142 100644 --- a/numpy/core/include/numpy/npy_common.h +++ b/numpy/core/include/numpy/npy_common.h @@ -6,10 +6,12 @@ #if defined(_MSC_VER) #define NPY_INLINE __inline -#elif defined(inline) - #define NPY_INLINE inline -#elif defined(__inline__) - #define NPY_INLINE __inline__ +#elif defined(__GNUC__) + #if defined(__STRICT_ANSI__) + #define NPY_INLINE __inline__ + #else + #define NPY_INLINE inline + #endif #else #define NPY_INLINE #endif -- cgit v1.2.1