summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--array.c3
-rw-r--r--enum.c16
-rw-r--r--range.c3
3 files changed, 12 insertions, 10 deletions
diff --git a/array.c b/array.c
index 83a7274..b4b079d 100644
--- a/array.c
+++ b/array.c
@@ -3169,8 +3169,9 @@ rb_ary_delete_if(VALUE ary)
}
static VALUE
-take_i(VALUE val, VALUE *args, int argc, VALUE *argv, VALUE blockarg)
+take_i(VALUE val, VALUE cbarg, int argc, const VALUE *argv, VALUE blockarg)
{
+ VALUE *args = (VALUE *)cbarg;
if (args[1]-- == 0) rb_iter_break();
if (argc > 1) val = rb_ary_new4(argc, argv);
rb_ary_push(args[0], val);
diff --git a/enum.c b/enum.c
index 02c48ca..b742d92 100644
--- a/enum.c
+++ b/enum.c
@@ -400,7 +400,7 @@ collect_i(VALUE i, VALUE ary, int argc, VALUE *argv, VALUE blockarg)
}
static VALUE
-collect_all(VALUE i, VALUE ary, int argc, VALUE *argv)
+collect_all(VALUE i, VALUE ary, int argc, VALUE *argv, VALUE blockarg)
{
rb_thread_check_ints();
rb_ary_push(ary, rb_enum_values_pack(argc, argv));
@@ -1003,13 +1003,13 @@ enum_sort_by(VALUE obj)
static VALUE enum_##name##_func(VALUE result, NODE *memo); \
\
static VALUE \
-name##_i(VALUE i, VALUE memo, int argc, VALUE *argv) \
+name##_i(VALUE i, VALUE memo, int argc, VALUE *argv, VALUE blockarg) \
{ \
return enum_##name##_func(rb_enum_values_pack(argc, argv), RNODE(memo)); \
} \
\
static VALUE \
-name##_iter_i(VALUE i, VALUE memo, int argc, VALUE *argv) \
+name##_iter_i(VALUE i, VALUE memo, int argc, VALUE *argv, VALUE blockarg) \
{ \
return enum_##name##_func(enum_yield(argc, argv), RNODE(memo)); \
} \
@@ -1182,7 +1182,7 @@ min_i(VALUE i, VALUE args, int argc, VALUE *argv, VALUE blockarg)
}
static VALUE
-min_ii(VALUE i, VALUE args, int argc, VALUE *argv)
+min_ii(VALUE i, VALUE args, int argc, VALUE *argv, VALUE blockarg)
{
VALUE cmp;
NODE *memo = RNODE(args);
@@ -1254,7 +1254,7 @@ max_i(VALUE i, VALUE args, int argc, VALUE *argv, VALUE blockarg)
}
static VALUE
-max_ii(VALUE i, VALUE args, int argc, VALUE *argv)
+max_ii(VALUE i, VALUE args, int argc, VALUE *argv, VALUE blockarg)
{
NODE *memo = RNODE(args);
VALUE cmp;
@@ -1386,7 +1386,7 @@ minmax_ii_update(VALUE i, VALUE j, struct minmax_t *memo)
}
static VALUE
-minmax_ii(VALUE i, VALUE _memo, int argc, VALUE *argv)
+minmax_ii(VALUE i, VALUE _memo, int argc, VALUE *argv, VALUE blockarg)
{
struct minmax_t *memo = (struct minmax_t *)&RNODE(_memo)->u1.value;
int n;
@@ -2365,7 +2365,7 @@ struct chunk_arg {
};
static VALUE
-chunk_ii(VALUE i, VALUE _argp, int argc, VALUE *argv)
+chunk_ii(VALUE i, VALUE _argp, int argc, VALUE *argv, VALUE blockarg)
{
struct chunk_arg *argp = MEMO_FOR(struct chunk_arg, _argp);
VALUE v;
@@ -2560,7 +2560,7 @@ struct slicebefore_arg {
};
static VALUE
-slicebefore_ii(VALUE i, VALUE _argp, int argc, VALUE *argv)
+slicebefore_ii(VALUE i, VALUE _argp, int argc, VALUE *argv, VALUE blockarg)
{
struct slicebefore_arg *argp = MEMO_FOR(struct slicebefore_arg, _argp);
VALUE header_p;
diff --git a/range.c b/range.c
index b0a59e1..c666b88 100644
--- a/range.c
+++ b/range.c
@@ -844,8 +844,9 @@ range_end(VALUE range)
static VALUE
-first_i(VALUE i, VALUE *ary)
+first_i(VALUE i, VALUE cbarg, int argc, VALUE *argv, VALUE blockarg)
{
+ VALUE *ary = (VALUE *)cbarg;
long n = NUM2LONG(ary[0]);
if (n <= 0) {