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 /io.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 'io.c')
-rw-r--r-- | io.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -7183,7 +7183,7 @@ check_pipe_command(VALUE filename_or_command) */ static VALUE -rb_f_open(int argc, VALUE *argv) +rb_f_open(int argc, VALUE *argv, VALUE _) { ID to_open = 0; int redirect = FALSE; @@ -7518,7 +7518,7 @@ rb_io_printf(int argc, const VALUE *argv, VALUE out) */ static VALUE -rb_f_printf(int argc, VALUE *argv) +rb_f_printf(int argc, VALUE *argv, VALUE _) { VALUE out; @@ -7619,7 +7619,7 @@ rb_io_print(int argc, const VALUE *argv, VALUE out) */ static VALUE -rb_f_print(int argc, const VALUE *argv) +rb_f_print(int argc, const VALUE *argv, VALUE _) { rb_io_print(argc, argv, rb_stdout); return Qnil; @@ -10007,7 +10007,7 @@ rb_io_fcntl(int argc, VALUE *argv, VALUE io) */ static VALUE -rb_f_syscall(int argc, VALUE *argv) +rb_f_syscall(int argc, VALUE *argv, VALUE _) { VALUE arg[8]; #if SIZEOF_VOIDP == 8 && defined(HAVE___SYSCALL) && SIZEOF_INT != 8 /* mainly *BSD */ |