summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-04-24 12:09:16 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2019-04-24 12:09:16 +0900
commit163a6d01e035f16b15d3b08c0dfddd2caec09f9b (patch)
tree90aaebc326085bb83901c48b22b2c4afcbe4f7a8
parent0c5f26e0ffc30bdc88b857daed1c9fe18c4b8f0c (diff)
downloadmruby-163a6d01e035f16b15d3b08c0dfddd2caec09f9b.tar.gz
mruby-163a6d01e035f16b15d3b08c0dfddd2caec09f9b.zip
Reorganize defines related to `MRB_INLINE`; ref #4391
-rw-r--r--include/mruby/common.h10
-rw-r--r--include/mruby/value.h3
2 files changed, 5 insertions, 8 deletions
diff --git a/include/mruby/common.h b/include/mruby/common.h
index 4eaac9af7..dc9e3acc5 100644
--- a/include/mruby/common.h
+++ b/include/mruby/common.h
@@ -54,12 +54,12 @@ MRB_BEGIN_DECL
#endif
/** Declare a function as always inlined. */
-#if defined(_MSC_VER)
-# define MRB_INLINE static __inline
-#else
-# define MRB_INLINE static inline
+#if defined _MSC_VER && _MSC_VER < 1900
+# ifndef __cplusplus
+# define inline __inline
+# endif
#endif
-
+#define MRB_INLINE static inline
/** Declare a public MRuby API function. */
#if defined(MRB_BUILD_AS_DLL)
diff --git a/include/mruby/value.h b/include/mruby/value.h
index 4d47d30ff..6838daaa5 100644
--- a/include/mruby/value.h
+++ b/include/mruby/value.h
@@ -73,9 +73,6 @@ MRB_API double mrb_float_read(const char*, char**);
#endif
#if defined _MSC_VER && _MSC_VER < 1900
-# ifndef __cplusplus
-# define inline __inline
-# endif
# include <stdarg.h>
MRB_API int mrb_msvc_vsnprintf(char *s, size_t n, const char *format, va_list arg);
MRB_API int mrb_msvc_snprintf(char *s, size_t n, const char *format, ...);