aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ruby/defines.h5
-rw-r--r--include/ruby/intern.h5
2 files changed, 6 insertions, 4 deletions
diff --git a/include/ruby/defines.h b/include/ruby/defines.h
index b7409a3e6c..fb80813f05 100644
--- a/include/ruby/defines.h
+++ b/include/ruby/defines.h
@@ -361,6 +361,11 @@ ruby_xrealloc2_with_location(void *ptr, size_t s1, size_t s2, const char *file,
#define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN
#define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END
+#if defined(MJIT_HEADER) && defined(_MSC_VER)
+# undef MJIT_FUNC_EXPORTED
+# define MJIT_FUNC_EXPORTED static
+#endif
+
#ifndef RUBY_EXTERN
#define RUBY_EXTERN extern
#endif
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 3c625b42e9..11a97cb6a2 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -36,12 +36,9 @@ extern "C" {
/* On mswin, MJIT header transformation can't be used since cl.exe can't output
preprocessed output preserving macros. So this `MJIT_STATIC` is needed
- to force non-static function to static on MJIT header to avoid symbol conflict.
- `MJIT_FUNC_EXPORTED` is also changed to `static` on MJIT header for the same reason. */
+ to force non-static function to static on MJIT header to avoid symbol conflict. */
#ifdef MJIT_HEADER
# define MJIT_STATIC static
-# undef MJIT_FUNC_EXPORTED
-# define MJIT_FUNC_EXPORTED static
#else
# define MJIT_STATIC
#endif