aboutsummaryrefslogtreecommitdiffstats
path: root/error.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 /error.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 'error.c')
-rw-r--r--error.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/error.c b/error.c
index 0859036615..13d191007b 100644
--- a/error.c
+++ b/error.c
@@ -159,7 +159,7 @@ rb_warning_s_warn(VALUE mod, VALUE str)
* printing the warning to $stderr.
*/
-VALUE
+static VALUE
rb_warning_warn(VALUE mod, VALUE str)
{
return rb_funcallv(mod, id_warn, 1, &str);
@@ -1169,6 +1169,8 @@ exc_backtrace(VALUE exc)
return obj;
}
+static VALUE rb_check_backtrace(VALUE);
+
VALUE
rb_get_backtrace(VALUE exc)
{
@@ -1212,7 +1214,7 @@ exc_backtrace_locations(VALUE exc)
return obj;
}
-VALUE
+static VALUE
rb_check_backtrace(VALUE bt)
{
long i;
@@ -1506,6 +1508,8 @@ name_err_initialize(int argc, VALUE *argv, VALUE self)
return self;
}
+static VALUE rb_name_err_mesg_new(VALUE mesg, VALUE recv, VALUE method);
+
static VALUE
name_err_init(VALUE exc, VALUE mesg, VALUE recv, VALUE method)
{
@@ -1636,7 +1640,7 @@ static const rb_data_type_t name_err_mesg_data_type = {
};
/* :nodoc: */
-VALUE
+static VALUE
rb_name_err_mesg_new(VALUE mesg, VALUE recv, VALUE method)
{
VALUE result = TypedData_Wrap_Struct(rb_cNameErrorMesg, &name_err_mesg_data_type, 0);