From 864bc4f18beb189c07a22e605810bb8d6eef5645 Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 29 Oct 2001 06:16:01 +0000 Subject: [PATCH] * intern.h (rb_protect_inspect): follow the change of array.c. * eval.c (rb_exec_end_proc): follow the change of rb_protect(). * eval.c (method_proc, umethod_proc, rb_catch): cast the first parameter of rb_iterate() to avoid VC++ warning. * range.c (range_step): ditto. * ext/sdbm/init.c (fsdbm_update, fsdbm_replace): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 15 ++++++++++++++- eval.c | 10 +++++----- ext/sdbm/init.c | 4 ++-- intern.h | 2 +- range.c | 3 ++- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 99dc250977..c1c2cb06cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,19 @@ +Mon Oct 29 14:56:44 2001 Usaku Nakamura + + * intern.h (rb_protect_inspect): follow the change of array.c. + + * eval.c (rb_exec_end_proc): follow the change of rb_protect(). + + * eval.c (method_proc, umethod_proc, rb_catch): cast the first + parameter of rb_iterate() to avoid VC++ warning. + + * range.c (range_step): ditto. + + * ext/sdbm/init.c (fsdbm_update, fsdbm_replace): ditto. + Mon Oct 29 07:57:31 2001 Yukihiro Matsumoto - * parse.y (str_extend): shuould allow interpolation of $-x. + * parse.y (str_extend): should allow interpolation of $-x. * variable.c (rb_cvar_set): empty iv_tbl may cause infinite loop. diff --git a/eval.c b/eval.c index 5fb2213c75..e9cf463d9f 100644 --- a/eval.c +++ b/eval.c @@ -5967,7 +5967,7 @@ rb_exec_end_proc() save = link = end_procs; while (link) { - rb_protect((VALUE(*)())link->func, link->data, &status); + rb_protect((VALUE(*)_((VALUE)))link->func, link->data, &status); if (status) { error_handle(status); } @@ -5975,7 +5975,7 @@ rb_exec_end_proc() } link = end_procs; while (link != save) { - rb_protect((VALUE(*)())link->func, link->data, &status); + rb_protect((VALUE(*)_((VALUE)))link->func, link->data, &status); if (status) { error_handle(status); } @@ -6948,14 +6948,14 @@ static VALUE method_proc(method) VALUE method; { - return rb_iterate(mproc, 0, bmcall, method); + return rb_iterate((VALUE(*)_((VALUE)))mproc, 0, bmcall, method); } static VALUE umethod_proc(method) VALUE method; { - return rb_iterate(mproc, 0, umcall, method); + return rb_iterate((VALUE(*)_((VALUE)))mproc, 0, umcall, method); } static VALUE @@ -9074,7 +9074,7 @@ rb_catch(tag, proc, data) VALUE (*proc)(); VALUE data; { - return rb_iterate(catch_i, rb_intern(tag), proc, data); + return rb_iterate((VALUE(*)_((VALUE)))catch_i, rb_intern(tag), proc, data); } static VALUE diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c index 507fae69c1..b3365ff429 100644 --- a/ext/sdbm/init.c +++ b/ext/sdbm/init.c @@ -381,7 +381,7 @@ static VALUE fsdbm_update(obj, other) VALUE obj, other; { - rb_iterate(each_pair, other, update_i, obj); + rb_iterate((VALUE(*)_((VALUE)))each_pair, other, update_i, obj); return obj; } @@ -390,7 +390,7 @@ fsdbm_replace(obj, other) VALUE obj, other; { fsdbm_clear(obj); - rb_iterate(each_pair, other, update_i, obj); + rb_iterate((VALUE(*)_((VALUE)))each_pair, other, update_i, obj); return obj; } diff --git a/intern.h b/intern.h index 21776fe213..8337de4585 100644 --- a/intern.h +++ b/intern.h @@ -50,7 +50,7 @@ VALUE rb_ary_assoc _((VALUE, VALUE)); VALUE rb_ary_rassoc _((VALUE, VALUE)); VALUE rb_ary_includes _((VALUE, VALUE)); VALUE rb_ary_cmp _((VALUE, VALUE)); -VALUE rb_protect_inspect _((VALUE(*)(VALUE,VALUE),VALUE,VALUE)); +VALUE rb_protect_inspect _((VALUE(*)(ANYARGS),VALUE,VALUE)); VALUE rb_inspecting_p _((VALUE)); /* bignum.c */ VALUE rb_big_clone _((VALUE)); diff --git a/range.c b/range.c index 6a1afde610..9f6581f14b 100644 --- a/range.c +++ b/range.c @@ -311,7 +311,8 @@ range_step(argc, argv, range) args[0] = b; args[1] = e; args[2] = range; iter[0] = 1; iter[1] = NUM2LONG(step); - rb_iterate(r_step_str, (VALUE)args, r_step_str_i, (VALUE)iter); + rb_iterate((VALUE(*)_((VALUE)))r_step_str, (VALUE)args, r_step_str_i, + (VALUE)iter); } else { /* generic each */ VALUE v = b;