diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-29 10:45:09 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-29 18:34:09 +0900 |
commit | 9b429eb3b15321115d9a217c91c5510fe43777a7 (patch) | |
tree | 08c050a9c241a8b068a131754dc29bee72a974bc /class.c | |
parent | 0b81e7d6e2810adac081965f0da1d8064888c0bd (diff) |
drop-in type check for rb_define_protected_method
We can check the function pointer passed to
rb_define_protected_method like how we do so in rb_define_method.
This changeset revealed no prototypes mismatches.
Diffstat (limited to 'class.c')
-rw-r--r-- | class.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1552,6 +1552,9 @@ rb_define_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc rb_add_method_cfunc(klass, rb_intern(name), func, argc, METHOD_VISI_PUBLIC); } +#ifdef rb_define_protected_method +#undef rb_define_protected_method +#endif void rb_define_protected_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc) { |