ruby-changes:50561
From: nobu <ko1@a...>
Date: Fri, 9 Mar 2018 12:57:39 +0900 (JST)
Subject: [ruby-changes:50561] nobu:r62704 (trunk): math.c: calling order
nobu 2018-03-09 12:57:34 +0900 (Fri, 09 Mar 2018) New Revision: 62704 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62704 Log: math.c: calling order * math.c (math_log, rb_math_log): inverted calling order, to remove unused argument. Modified files: trunk/math.c Index: math.c =================================================================== --- math.c (revision 62703) +++ math.c (revision 62704) @@ -426,6 +426,7 @@ math_exp(VALUE unused_obj, VALUE x) https://github.com/ruby/ruby/blob/trunk/math.c#L426 #endif static double math_log1(VALUE x); +FUNC_MINIMIZED(static VALUE math_log(int, const VALUE *, VALUE)); /* * call-seq: @@ -451,6 +452,12 @@ static double math_log1(VALUE x); https://github.com/ruby/ruby/blob/trunk/math.c#L452 static VALUE math_log(int argc, const VALUE *argv, VALUE unused_obj) { + return rb_math_log(argc, argv); +} + +VALUE +rb_math_log(int argc, const VALUE *argv) +{ VALUE x, base; double d; @@ -923,13 +930,6 @@ exp1(cos) https://github.com/ruby/ruby/blob/trunk/math.c#L930 exp1(cosh) exp1(exp) exp2(hypot) - -VALUE -rb_math_log(int argc, const VALUE *argv) -{ - return math_log(argc, argv, 0); -} - exp1(sin) exp1(sinh) #if 0 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/