aboutsummaryrefslogtreecommitdiffstats
path: root/enumerator.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-26 13:30:04 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-27 15:52:26 +0900
commit7329b3339adab12092056bd8159513645d4f9e8a (patch)
tree0a9f5e23d07b47b4b459077ccb2c963dbac8dc41 /enumerator.c
parent0c8592b9af304dfcac0d08ba96d5f22ad8312e1a (diff)
downloadruby-7329b3339adab12092056bd8159513645d4f9e8a.tar.gz
#define RB_BLOCK_CALL_FUNC_STRICT 1
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. Let's start from making rb_block_call_func_t strict, and apply RB_BLOCK_CALL_FUNC_ARGLIST liberally.
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/enumerator.c b/enumerator.c
index 6a2443fcaf..beea1c728f 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -1567,7 +1567,7 @@ lazy_init_block_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
#define LAZY_MEMO_RESET_PACKED(memo) ((memo)->memo_flags &= ~LAZY_MEMO_PACKED)
static VALUE
-lazy_init_yielder(VALUE val, VALUE m, int argc, VALUE *argv)
+lazy_init_yielder(RB_BLOCK_CALL_FUNC_ARGLIST(_, m))
{
VALUE yielder = RARRAY_AREF(m, 0);
VALUE procs_array = RARRAY_AREF(m, 1);
@@ -1598,7 +1598,7 @@ lazy_init_yielder(VALUE val, VALUE m, int argc, VALUE *argv)
}
static VALUE
-lazy_init_block(VALUE val, VALUE m, int argc, VALUE *argv)
+lazy_init_block(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
{
VALUE procs = RARRAY_AREF(m, 1);
@@ -2860,7 +2860,7 @@ enum_chain_enum_size(VALUE obj, VALUE args, VALUE eobj)
}
static VALUE
-enum_chain_yield_block(VALUE arg, VALUE block, int argc, VALUE *argv)
+enum_chain_yield_block(RB_BLOCK_CALL_FUNC_ARGLIST(_, block))
{
return rb_funcallv(block, id_call, argc, argv);
}