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

ruby-changes:53548

From: nobu <ko1@a...>
Date: Fri, 16 Nov 2018 15:52:05 +0900 (JST)
Subject: [ruby-changes:53548] nobu:r65764 (trunk): Make some internal functions static

nobu	2018-11-16 15:52:00 +0900 (Fri, 16 Nov 2018)

  New Revision: 65764

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

  Log:
    Make some internal functions static

  Modified files:
    trunk/enc/unicode/10.0.0/name2ctype.h
    trunk/numeric.c
    trunk/tool/enc-unicode.rb
    trunk/vm_backtrace.c
Index: numeric.c
===================================================================
--- numeric.c	(revision 65763)
+++ numeric.c	(revision 65764)
@@ -3902,7 +3902,7 @@ rb_int_modulo(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/numeric.c#L3902
  *  See Numeric#divmod.
  */
 
-VALUE
+static VALUE
 int_remainder(VALUE x, VALUE y)
 {
     if (FIXNUM_P(x)) {
Index: enc/unicode/10.0.0/name2ctype.h
===================================================================
--- enc/unicode/10.0.0/name2ctype.h	(revision 65763)
+++ enc/unicode/10.0.0/name2ctype.h	(revision 65764)
@@ -34756,9 +34756,11 @@ struct uniname2ctype_struct { https://github.com/ruby/ruby/blob/trunk/enc/unicode/10.0.0/name2ctype.h#L34756
 };
 #define uniname2ctype_offset(str) offsetof(struct uniname2ctype_pool_t, uniname2ctype_pool_##str)
 
-#if !1+0
-static const struct uniname2ctype_struct *uniname2ctype_p(const char *, unsigned int);
+static const struct uniname2ctype_struct *uniname2ctype_p(
+#if !(1+0) /* if ANSI, old style not to conflict with generated prototype */
+    const char *, unsigned int
 #endif
+);
 
 #ifndef USE_UNICODE_PROPERTIES
 #define TOTAL_KEYWORDS 15
Index: tool/enc-unicode.rb
===================================================================
--- tool/enc-unicode.rb	(revision 65763)
+++ tool/enc-unicode.rb	(revision 65764)
@@ -448,9 +448,11 @@ struct uniname2ctype_struct { https://github.com/ruby/ruby/blob/trunk/tool/enc-unicode.rb#L448
 };
 #define uniname2ctype_offset(str) offsetof(struct uniname2ctype_pool_t, uniname2ctype_pool_##str)
 
-#if !(/*ANSI*/+0)
-static const struct uniname2ctype_struct *uniname2ctype_p(const char *, unsigned int);
+static const struct uniname2ctype_struct *uniname2ctype_p(
+#if !(/*ANSI*/+0) /* if ANSI, old style not to conflict with generated prototype */
+    const char *, unsigned int
 #endif
+);
 %}
 struct uniname2ctype_struct;
 %%
Index: vm_backtrace.c
===================================================================
--- vm_backtrace.c	(revision 65763)
+++ vm_backtrace.c	(revision 65764)
@@ -693,7 +693,7 @@ rb_ec_backtrace_str_ary(const rb_executi https://github.com/ruby/ruby/blob/trunk/vm_backtrace.c#L693
     return backtrace_to_str_ary(rb_ec_backtrace_object(ec), lev, n);
 }
 
-VALUE
+static VALUE
 ec_backtrace_location_ary(const rb_execution_context_t *ec, long lev, long n)
 {
     return backtrace_to_location_ary(rb_ec_backtrace_object(ec), lev, n);

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

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