summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-23 20:13:34 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-23 20:18:32 +0900
commit1d91feaf13e0ffe04b2dabc6e77e4101b6d0bb07 (patch)
tree4e1d7dc63b7eded09359cce54840174f7a1be72a /include/ruby
parent8bb716ab91577f2b1e21e833fb3f3170032ba881 (diff)
downloadruby-1d91feaf13e0ffe04b2dabc6e77e4101b6d0bb07.tar.gz
Limit strict RUBY_METHOD_FUNC in C++
Limit strict function signature check with RUBY_METHOD_FUNC in C++ to bundled libraries only. [Bug #16271]
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/ruby.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index b144fa0111..2f9855e41e 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -2855,7 +2855,7 @@ RB_METHOD_DEFINITION_DECL(rb_define_global_function, (1,2), (const char *name),
#endif
-#if !defined(__cplusplus) || defined(RB_METHOD_DEFINITION_DECL)
+#if defined(RUBY_DEVEL) && RUBY_DEVEL && (!defined(__cplusplus) || defined(RB_METHOD_DEFINITION_DECL))
# define RUBY_METHOD_FUNC(func) (func)
#else
# define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))(func))