summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-26 14:25:53 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-27 15:52:26 +0900
commitb8fd2e83e7b18fe3c70fc342388b1cb054b22e42 (patch)
treeede1f096b9a970a831f036323915b1b76f40aa17 /proc.c
parent7329b3339adab12092056bd8159513645d4f9e8a (diff)
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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/proc.c b/proc.c
index 810fe79c92..1c0a5dfcd9 100644
--- a/proc.c
+++ b/proc.c
@@ -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