diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-01-28 17:20:16 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-01-28 17:29:57 +0900 |
commit | 83d6487ae5c5df6c463373b36ccf1bee3f91d386 (patch) | |
tree | 4e6506890db03f4fc78ceca1bb28579330fc4021 /include | |
parent | bbe3420cce30de74b8c4a4f21adecf57a7d52395 (diff) | |
download | ruby-83d6487ae5c5df6c463373b36ccf1bee3f91d386.tar.gz |
fix rb_define_global_function to take const VALUE*
It was unable for rb_define_global_function to take VALUE(*)(int argc,
const VLAUE *argv, VALUE self) -style function. Test added.
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/backward/cxxanyargs.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/backward/cxxanyargs.hpp b/include/ruby/backward/cxxanyargs.hpp index 31758c14e5..0acbc95443 100644 --- a/include/ruby/backward/cxxanyargs.hpp +++ b/include/ruby/backward/cxxanyargs.hpp @@ -574,7 +574,7 @@ struct driver0 { template<bool b> struct specific< 0, b> : public engine< 0, VALUE(*)(VALUE)> {}; template<bool b> struct specific<-1, b> : public engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)> { using engine<-1, VALUE(*)(int argc, VALUE *argv, VALUE self)>::define; - static inline void define(T m, VALUE(*f)(int argc, const VALUE *argv, VALUE self, VALUE)) { F(m, reinterpret_cast<type *>(f), -1); } + static inline void define(T m, VALUE(*f)(int argc, const VALUE *argv, VALUE self)) { F(m, reinterpret_cast<type *>(f), -1); } }; template<bool b> struct specific<-2, b> : public engine<-2, VALUE(*)(VALUE, VALUE)> {}; /// @endcond |