diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-28 18:19:11 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-29 18:34:09 +0900 |
commit | 7bcfd9189a6a0b2ad58fed988faaf795a4987893 (patch) | |
tree | 219f0c172e038ea6be1e103db11f7457dc703328 /class.c | |
parent | 7b6fde4258e700c0e0292bb091aa84a5e473342e (diff) |
drop-in type check for rb_define_global_function
We can check the function pointer passed to rb_define_global_function
like we do so in rb_define_method. It turns out that almost anybody
is misunderstanding the API.
Diffstat (limited to 'class.c')
-rw-r--r-- | class.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1767,7 +1767,9 @@ rb_define_module_function(VALUE module, const char *name, VALUE (*func)(ANYARGS) rb_define_singleton_method(module, name, func, argc); } - +#ifdef rb_define_global_function +#undef rb_define_global_function +#endif /*! * Defines a global function * \param name name of the function |