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 /vm_backtrace.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 'vm_backtrace.c')
-rw-r--r-- | vm_backtrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_backtrace.c b/vm_backtrace.c index ef644052a5..44a4ac0784 100644 --- a/vm_backtrace.c +++ b/vm_backtrace.c @@ -1007,7 +1007,7 @@ rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval) */ static VALUE -rb_f_caller(int argc, VALUE *argv) +rb_f_caller(int argc, VALUE *argv, VALUE _) { return ec_backtrace_to_ary(GET_EC(), argc, argv, 1, 1, 1); } @@ -1035,7 +1035,7 @@ rb_f_caller(int argc, VALUE *argv) * entries within the specified range. */ static VALUE -rb_f_caller_locations(int argc, VALUE *argv) +rb_f_caller_locations(int argc, VALUE *argv, VALUE _) { return ec_backtrace_to_ary(GET_EC(), argc, argv, 1, 1, 0); } |