diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-26 14:25:53 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-27 15:52:26 +0900 |
commit | b8fd2e83e7b18fe3c70fc342388b1cb054b22e42 (patch) | |
tree | ede1f096b9a970a831f036323915b1b76f40aa17 /proc.c | |
parent | 7329b3339adab12092056bd8159513645d4f9e8a (diff) | |
download | ruby-b8fd2e83e7b18fe3c70fc342388b1cb054b22e42.tar.gz |
decouple compile.c usage of imemo_ifunc
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is
dangerous and should be extinct. This commit deletes ANYARGS from
struct vm_ifunc, but in doing so we also have to decouple the usage
of this struct in compile.c, which (I think) is an abuse of ANYARGS.
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -43,7 +43,7 @@ VALUE rb_cMethod; VALUE rb_cBinding; VALUE rb_cProc; -static VALUE bmcall(VALUE, VALUE, int, VALUE *, VALUE); +static rb_block_call_func bmcall; static int method_arity(VALUE); static int method_min_max_arity(VALUE, int *max); @@ -696,7 +696,7 @@ sym_proc_new(VALUE klass, VALUE sym) } struct vm_ifunc * -rb_vm_ifunc_new(VALUE (*func)(ANYARGS), const void *data, int min_argc, int max_argc) +rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc) { union { struct vm_ifunc_argc argc; @@ -2783,9 +2783,9 @@ mlambda(VALUE method) } static VALUE -bmcall(VALUE args, VALUE method, int argc, VALUE *argv, VALUE passed_proc) +bmcall(RB_BLOCK_CALL_FUNC_ARGLIST(args, method)) { - return rb_method_call_with_block(argc, argv, method, passed_proc); + return rb_method_call_with_block(argc, argv, method, blockarg); } VALUE |