ruby-changes:41773
From: nobu <ko1@a...>
Date: Wed, 17 Feb 2016 11:37:47 +0900 (JST)
Subject: [ruby-changes:41773] nobu:r53847 (trunk): numeric.c: adjust types
nobu 2016-02-17 11:38:09 +0900 (Wed, 17 Feb 2016) New Revision: 53847 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53847 Log: numeric.c: adjust types * numeric.c (coerce_body, coerce_rescue, coerce_rescue_quiet): adjust parameter types for rb_rescue. Modified files: trunk/numeric.c Index: numeric.c =================================================================== --- numeric.c (revision 53846) +++ numeric.c (revision 53847) @@ -239,8 +239,9 @@ num_coerce(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/numeric.c#L239 } 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) https://github.com/ruby/ruby/blob/trunk/numeric.c#L260 } 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) https://github.com/ruby/ruby/blob/trunk/numeric.c#L283 if (!rb_respond_to(*y, id_coerce)) { if (err) { - coerce_rescue(a); + coerce_failed(*x, *y); } return FALSE; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/