From 0e8219f591f3f17cb7ee361e8a60dbef08145883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Mon, 18 Nov 2019 12:13:08 +0900 Subject: 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. --- math.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'math.c') 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; -- cgit v1.2.3