ruby-changes:58374
From: Nobuyoshi <ko1@a...>
Date: Wed, 23 Oct 2019 20:19:55 +0900 (JST)
Subject: [ruby-changes:58374] 1d91feaf13 (master): Limit strict RUBY_METHOD_FUNC in C++
https://git.ruby-lang.org/ruby.git/commit/?id=1d91feaf13 From 1d91feaf13e0ffe04b2dabc6e77e4101b6d0bb07 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 23 Oct 2019 20:13:34 +0900 Subject: Limit strict RUBY_METHOD_FUNC in C++ Limit strict function signature check with RUBY_METHOD_FUNC in C++ to bundled libraries only. [Bug #16271] diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index b144fa0..2f9855e 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), https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L2855 #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)) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/