diff options
author | David Cournapeau <cournape@gmail.com> | 2011-02-08 11:08:53 +0900 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2011-02-08 11:08:53 +0900 |
commit | 2c0f9f8cee2316eb80f1aac46ff7b193743337cb (patch) | |
tree | ab41afc324284f2d94cc4b6919b7f7654bbeb7aa | |
parent | 13c83fd3558cc366233f0522b2922f5ee95e8c4a (diff) | |
download | numpy-2c0f9f8cee2316eb80f1aac46ff7b193743337cb.tar.gz |
BUG: fix inline definition so that it still inlines in gcc -ansi mode.
-rw-r--r-- | numpy/core/include/numpy/npy_common.h | 10 |
1 files changed, 6 insertions, 4 deletions
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 |