From d45d20ede7d05644bb3c13e7c6dffce6a4d8b73e Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 8 Dec 2015 15:07:41 +0000 Subject: make local symbols static git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bignum.c | 2 +- error.c | 2 +- gc.c | 2 +- iseq.c | 4 ++-- variable.c | 6 ++++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bignum.c b/bignum.c index c780e7d7a3..cdb84c600d 100644 --- a/bignum.c +++ b/bignum.c @@ -4838,7 +4838,7 @@ rb_big2str_generic(VALUE x, int base) } #ifdef USE_GMP -VALUE +static VALUE big2str_gmp(VALUE x, int base) { const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT; diff --git a/error.c b/error.c index 5606612bb5..fb1de8a06e 100644 --- a/error.c +++ b/error.c @@ -917,7 +917,7 @@ rb_exc_set_backtrace(VALUE exc, VALUE bt) * information. */ -VALUE +static VALUE exc_cause(VALUE exc) { return rb_attr_get(exc, id_cause); diff --git a/gc.c b/gc.c index d16e2ae2eb..c2b28bb2a8 100644 --- a/gc.c +++ b/gc.c @@ -6875,7 +6875,7 @@ default_proc_for_compat_func(VALUE hash, VALUE dmy, int argc, VALUE *argv) return Qnil; } -size_t +static size_t gc_stat_internal(VALUE hash_or_sym) { rb_objspace_t *objspace = &rb_objspace; diff --git a/iseq.c b/iseq.c index 1fd4009a03..6376934b4e 100644 --- a/iseq.c +++ b/iseq.c @@ -1021,7 +1021,7 @@ iseqw_absolute_path(VALUE self) * > iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb') * > iseq.label #=>
*/ -VALUE +static VALUE iseqw_label(VALUE self) { return rb_iseq_label(iseqw_check(self)); @@ -1063,7 +1063,7 @@ iseqw_base_label(VALUE self) * iseq.first_lineno * #=> 1 */ -VALUE +static VALUE iseqw_first_lineno(VALUE self) { return rb_iseq_first_lineno(iseqw_check(self)); diff --git a/variable.c b/variable.c index f6dd3ee47d..e64a2fb217 100644 --- a/variable.c +++ b/variable.c @@ -1038,7 +1038,7 @@ gen_ivtbl_bytes(size_t n) return sizeof(struct gen_ivtbl) + n * sizeof(VALUE) - sizeof(VALUE); } -struct gen_ivtbl * +static struct gen_ivtbl * gen_ivtbl_resize(struct gen_ivtbl *old, long n) { long len = old ? old->numiv : 0; @@ -1052,7 +1052,8 @@ gen_ivtbl_resize(struct gen_ivtbl *old, long n) return ivtbl; } -struct gen_ivtbl * +#if 0 +static struct gen_ivtbl * gen_ivtbl_dup(const struct gen_ivtbl *orig) { size_t s = gen_ivtbl_bytes(orig->numiv); @@ -1062,6 +1063,7 @@ gen_ivtbl_dup(const struct gen_ivtbl *orig) return ivtbl; } +#endif static long iv_index_tbl_newsize(struct ivar_update *ivup) -- cgit v1.2.3