[前][次][番号順一覧][スレッド一覧]

ruby-changes:40885

From: nobu <ko1@a...>
Date: Wed, 9 Dec 2015 00:07:51 +0900 (JST)
Subject: [ruby-changes:40885] nobu:r52964 (trunk): make local symbols static

nobu	2015-12-09 00:07:41 +0900 (Wed, 09 Dec 2015)

  New Revision: 52964

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52964

  Log:
    make local symbols static

  Modified files:
    trunk/bignum.c
    trunk/error.c
    trunk/gc.c
    trunk/iseq.c
    trunk/variable.c
Index: variable.c
===================================================================
--- variable.c	(revision 52963)
+++ variable.c	(revision 52964)
@@ -1038,7 +1038,7 @@ gen_ivtbl_bytes(size_t n) https://github.com/ruby/ruby/blob/trunk/variable.c#L1038
     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, https://github.com/ruby/ruby/blob/trunk/variable.c#L1052
     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 *or https://github.com/ruby/ruby/blob/trunk/variable.c#L1063
 
     return ivtbl;
 }
+#endif
 
 static long
 iv_index_tbl_newsize(struct ivar_update *ivup)
Index: iseq.c
===================================================================
--- iseq.c	(revision 52963)
+++ iseq.c	(revision 52964)
@@ -1021,7 +1021,7 @@ iseqw_absolute_path(VALUE self) https://github.com/ruby/ruby/blob/trunk/iseq.c#L1021
  *	> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
  *	> iseq.label #=> <main>
  */
-VALUE
+static VALUE
 iseqw_label(VALUE self)
 {
     return rb_iseq_label(iseqw_check(self));
@@ -1063,7 +1063,7 @@ iseqw_base_label(VALUE self) https://github.com/ruby/ruby/blob/trunk/iseq.c#L1063
  *	iseq.first_lineno
  *	#=> 1
  */
-VALUE
+static VALUE
 iseqw_first_lineno(VALUE self)
 {
     return rb_iseq_first_lineno(iseqw_check(self));
Index: gc.c
===================================================================
--- gc.c	(revision 52963)
+++ gc.c	(revision 52964)
@@ -6875,7 +6875,7 @@ default_proc_for_compat_func(VALUE hash, https://github.com/ruby/ruby/blob/trunk/gc.c#L6875
     return Qnil;
 }
 
-size_t
+static size_t
 gc_stat_internal(VALUE hash_or_sym)
 {
     rb_objspace_t *objspace = &rb_objspace;
Index: error.c
===================================================================
--- error.c	(revision 52963)
+++ error.c	(revision 52964)
@@ -917,7 +917,7 @@ rb_exc_set_backtrace(VALUE exc, VALUE bt https://github.com/ruby/ruby/blob/trunk/error.c#L917
  * information.
  */
 
-VALUE
+static VALUE
 exc_cause(VALUE exc)
 {
     return rb_attr_get(exc, id_cause);
Index: bignum.c
===================================================================
--- bignum.c	(revision 52963)
+++ bignum.c	(revision 52964)
@@ -4838,7 +4838,7 @@ rb_big2str_generic(VALUE x, int base) https://github.com/ruby/ruby/blob/trunk/bignum.c#L4838
 }
 
 #ifdef USE_GMP
-VALUE
+static VALUE
 big2str_gmp(VALUE x, int base)
 {
     const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGIT)*CHAR_BIT;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]