1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* parse.y (ripper_s_allocate): add prototype for Microsoft compiler.

* range.c (range_step, range_each): need cast.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2004-10-29 08:19:50 +00:00
parent 7c04db1d3c
commit 61edd31bf6
3 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,9 @@
Fri Oct 29 17:18:22 2004 NAKAMURA Usaku <usa@ruby-lang.org>
* parse.y (ripper_s_allocate): add prototype for Microsoft compiler.
* range.c (range_step, range_each): need cast.
Fri Oct 29 11:35:04 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (rb_parser_append_print, rb_parser_while_loop): body node

View file

@ -8504,6 +8504,7 @@ ripper_lex_get_generic(parser, src)
return rb_funcall(src, ripper_id_gets, 0);
}
static VALUE ripper_s_allocate _((VALUE));
static VALUE
ripper_s_allocate(klass)
VALUE klass;

View file

@ -335,7 +335,8 @@ range_step(argc, argv, range)
if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
args[0] = b; args[1] = e; args[2] = range;
iter[0] = 1; iter[1] = unit;
rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
(VALUE)iter);
}
else if (rb_obj_is_kind_of(b, rb_cNumeric)) {
ID c = rb_intern(EXCL(range) ? "<" : "<=");
@ -417,7 +418,8 @@ range_each(range)
args[0] = beg; args[1] = end; args[2] = range;
iter[0] = 1; iter[1] = 1;
rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
(VALUE)iter);
}
else {
range_each_func(range, each_i, beg, end, NULL);