aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cont.c2
-rw-r--r--enumerator.c2
-rw-r--r--gc.c2
-rw-r--r--include/ruby/intern.h4
-rw-r--r--proc.c16
5 files changed, 13 insertions, 13 deletions
diff --git a/cont.c b/cont.c
index db422d9880..ea21b322b5 100644
--- a/cont.c
+++ b/cont.c
@@ -1770,7 +1770,7 @@ rb_fiber_initialize(int argc, VALUE* argv, VALUE self)
}
VALUE
-rb_fiber_new(VALUE (*func)(ANYARGS), VALUE obj)
+rb_fiber_new(rb_block_call_func_t func, VALUE obj)
{
return fiber_initialize(fiber_alloc(rb_cFiber), rb_proc_new(func, obj), &shared_fiber_pool);
}
diff --git a/enumerator.c b/enumerator.c
index afc9ed94fa..96daad2b4b 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -713,7 +713,7 @@ next_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, obj))
}
static VALUE
-next_i(VALUE curr, VALUE obj)
+next_i(RB_BLOCK_CALL_FUNC_ARGLIST(_, obj))
{
struct enumerator *e = enumerator_ptr(obj);
VALUE nil = Qnil;
diff --git a/gc.c b/gc.c
index 654a6c85e3..42559eb377 100644
--- a/gc.c
+++ b/gc.c
@@ -8867,7 +8867,7 @@ compat_key(VALUE key)
}
static VALUE
-default_proc_for_compat_func(VALUE hash, VALUE dmy, int argc, VALUE *argv)
+default_proc_for_compat_func(RB_BLOCK_CALL_FUNC_ARGLIST(hash, _))
{
VALUE key, new_key;
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 0aaeb82fb6..f3d3c29fbc 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -238,7 +238,7 @@ VALUE rb_singleton_class(VALUE);
int rb_cmpint(VALUE, VALUE, VALUE);
NORETURN(void rb_cmperr(VALUE, VALUE));
/* cont.c */
-VALUE rb_fiber_new(VALUE (*)(ANYARGS), VALUE);
+VALUE rb_fiber_new(rb_block_call_func_t, VALUE);
VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv);
VALUE rb_fiber_yield(int argc, const VALUE *argv);
VALUE rb_fiber_current(void);
@@ -446,7 +446,7 @@ void rb_obj_call_init(VALUE, int, const VALUE*);
VALUE rb_class_new_instance(int, const VALUE*, VALUE);
VALUE rb_block_proc(void);
VALUE rb_block_lambda(void);
-VALUE rb_proc_new(VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE);
+VALUE rb_proc_new(rb_block_call_func_t, VALUE);
VALUE rb_obj_is_proc(VALUE);
VALUE rb_proc_call(VALUE, VALUE);
VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE);
diff --git a/proc.c b/proc.c
index 1c0a5dfcd9..1b8aa3953b 100644
--- a/proc.c
+++ b/proc.c
@@ -2790,7 +2790,7 @@ bmcall(RB_BLOCK_CALL_FUNC_ARGLIST(args, method))
VALUE
rb_proc_new(
- VALUE (*func)(ANYARGS), /* VALUE yieldarg[, VALUE procarg] */
+ rb_block_call_func_t func,
VALUE val)
{
VALUE procval = rb_iterate(mproc, 0, func, val);
@@ -2987,7 +2987,7 @@ proc_binding(VALUE self)
return bindval;
}
-static VALUE curry(VALUE dummy, VALUE args, int argc, VALUE *argv, VALUE passed_proc);
+static rb_block_call_func curry;
static VALUE
make_curry_proc(VALUE proc, VALUE passed, VALUE arity)
@@ -3007,7 +3007,7 @@ make_curry_proc(VALUE proc, VALUE passed, VALUE arity)
}
static VALUE
-curry(VALUE dummy, VALUE args, int argc, VALUE *argv, VALUE passed_proc)
+curry(RB_BLOCK_CALL_FUNC_ARGLIST(_, args))
{
VALUE proc, passed, arity;
proc = RARRAY_AREF(args, 0);
@@ -3018,14 +3018,14 @@ curry(VALUE dummy, VALUE args, int argc, VALUE *argv, VALUE passed_proc)
rb_ary_freeze(passed);
if (RARRAY_LEN(passed) < FIX2INT(arity)) {
- if (!NIL_P(passed_proc)) {
+ if (!NIL_P(blockarg)) {
rb_warn("given block not used");
}
arity = make_curry_proc(proc, passed, arity);
return arity;
}
else {
- return rb_proc_call_with_block(proc, check_argc(RARRAY_LEN(passed)), RARRAY_CONST_PTR(passed), passed_proc);
+ return rb_proc_call_with_block(proc, check_argc(RARRAY_LEN(passed)), RARRAY_CONST_PTR(passed), blockarg);
}
}
@@ -3130,16 +3130,16 @@ rb_method_curry(int argc, const VALUE *argv, VALUE self)
}
static VALUE
-compose(VALUE dummy, VALUE args, int argc, VALUE *argv, VALUE passed_proc)
+compose(RB_BLOCK_CALL_FUNC_ARGLIST(_, args))
{
VALUE f, g, fargs;
f = RARRAY_AREF(args, 0);
g = RARRAY_AREF(args, 1);
if (rb_obj_is_proc(g))
- fargs = rb_proc_call_with_block(g, argc, argv, passed_proc);
+ fargs = rb_proc_call_with_block(g, argc, argv, blockarg);
else
- fargs = rb_funcall_with_block(g, idCall, argc, argv, passed_proc);
+ fargs = rb_funcall_with_block(g, idCall, argc, argv, blockarg);
if (rb_obj_is_proc(f))
return rb_proc_call(f, rb_ary_new3(1, fargs));