summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-19 16:19:48 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-19 16:19:48 (GMT)
commit46697c7e26472e39dbe963ebc33924a37e81d026 (patch)
treef19cf555061614db2a556383bca543625b101c9b /range.c
parente5de8868631b463f54e7ebeb196a815c3ca7bf14 (diff)
internal.h: use the same declaration as definition
range.c: cast the function type to meet the declaration This change is for fixing build error on AppVeyor: https://ci.appveyor.com/project/ruby/ruby/build/1.0.8177 string.c ../string.c(4330) : error C4028: formal parameter 2 different from declaration git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'range.c')
-rw-r--r--range.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/range.c b/range.c
index 0fc1605..fb3a4cb 100644
--- a/range.c
+++ b/range.c
@@ -432,7 +432,7 @@ range_step(int argc, VALUE *argv, VALUE range)
iter[1] = step;
if (NIL_P(e)) {
- rb_str_upto_endless_each(rb_sym2str(b), sym_step_i, (VALUE)iter);
+ rb_str_upto_endless_each(rb_sym2str(b), (VALUE (*)(VALUE, VALUE))sym_step_i, (VALUE)iter);
}
else {
args[0] = rb_sym2str(e);
@@ -467,7 +467,7 @@ range_step(int argc, VALUE *argv, VALUE range)
iter[1] = step;
if (NIL_P(e)) {
- rb_str_upto_endless_each(b, step_i, (VALUE)iter);
+ rb_str_upto_endless_each(b, (VALUE (*)(VALUE, VALUE))step_i, (VALUE)iter);
}
else {
args[0] = e;
@@ -836,7 +836,7 @@ range_each(VALUE range)
rb_block_call(tmp, rb_intern("upto"), 2, args, each_i, 0);
}
else if (RB_TYPE_P(beg, T_STRING)) {
- rb_str_upto_endless_each(beg, each_i, 0);
+ rb_str_upto_endless_each(beg, (VALUE (*)(VALUE, VALUE))each_i, 0);
}
else goto inf_loop;
}