summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-17 02:38:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-17 02:38:09 +0000
commite18654fff2a05a044f32dcd071f3925320151b38 (patch)
treef7d41c5bf4031c493445707caf9a991e561bc348
parentcee9c58ef214cbbf10aedacd79c3b796eb5bba8e (diff)
numeric.c: adjust types
* numeric.c (coerce_body, coerce_rescue, coerce_rescue_quiet): adjust parameter types for rb_rescue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--numeric.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/numeric.c b/numeric.c
index 6f094c1..e49ce53 100644
--- a/numeric.c
+++ b/numeric.c
@@ -239,8 +239,9 @@ num_coerce(VALUE x, VALUE y)
}
static VALUE
-coerce_body(VALUE *x)
+coerce_body(VALUE arg)
{
+ VALUE *x = (VALUE *)arg;
return rb_funcall(x[1], id_coerce, 1, x[0]);
}
@@ -259,14 +260,15 @@ coerce_failed(VALUE x, VALUE y)
}
static VALUE
-coerce_rescue(VALUE *x)
+coerce_rescue(VALUE arg)
{
+ VALUE *x = (VALUE *)arg;
coerce_failed(x[0], x[1]);
return Qnil; /* dummy */
}
static VALUE
-coerce_rescue_quiet(VALUE *x)
+coerce_rescue_quiet(VALUE arg)
{
return Qundef;
}
@@ -281,7 +283,7 @@ do_coerce(VALUE *x, VALUE *y, int err)
if (!rb_respond_to(*y, id_coerce)) {
if (err) {
- coerce_rescue(a);
+ coerce_failed(*x, *y);
}
return FALSE;
}