aboutsummaryrefslogtreecommitdiffstats
path: root/math.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-11-18 12:13:08 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-11-19 12:36:19 +0900
commit0e8219f591f3f17cb7ee361e8a60dbef08145883 (patch)
tree89704f4d90521cf52ef1befc5e87429f8a9d5da3 /math.c
parent78e266da1dede1c81e634982e76a129c5720d80e (diff)
downloadruby-0e8219f591f3f17cb7ee361e8a60dbef08145883.tar.gz
make functions static
These functions are used from within a compilation unit so we can make them static, for better binary size. This changeset reduces the size of generated ruby binary from 26,590,128 bytes to 26,584,472 bytes on my macihne.
Diffstat (limited to 'math.c')
-rw-r--r--math.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/math.c b/math.c
index 57dc2fcaf0..b28cabd881 100644
--- a/math.c
+++ b/math.c
@@ -573,6 +573,8 @@ math_log10(VALUE unused_obj, VALUE x)
return DBL2NUM(log10(d) + numbits * log10(2)); /* log10(d * 2 ** numbits) */
}
+static VALUE rb_math_sqrt(VALUE x);
+
/*
* call-seq:
* Math.sqrt(x) -> Float
@@ -630,7 +632,7 @@ f_signbit(VALUE x)
return f_negative_p(x);
}
-VALUE
+static VALUE
rb_math_sqrt(VALUE x)
{
double d;