diff options
author | 卜部昌平 <[email protected]> | 2019-11-18 12:13:08 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2019-11-19 12:36:19 +0900 |
commit | 0e8219f591f3f17cb7ee361e8a60dbef08145883 (patch) | |
tree | 89704f4d90521cf52ef1befc5e87429f8a9d5da3 /error.c | |
parent | 78e266da1dede1c81e634982e76a129c5720d80e (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2682
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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); |