aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-16 06:52:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-16 06:52:00 +0000
commit34cc6fef830adb4f5fcb54e5ee7cfe340da5eb04 (patch)
tree8df50b0d900a3e2c613feaf437a6648c2068db84
parent429245aa9f858c297d613636b9b8be8671471a64 (diff)
downloadruby-34cc6fef830adb4f5fcb54e5ee7cfe340da5eb04.tar.gz
Make some internal functions static
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--enc/unicode/10.0.0/name2ctype.h6
-rw-r--r--numeric.c2
-rwxr-xr-xtool/enc-unicode.rb6
-rw-r--r--vm_backtrace.c2
4 files changed, 10 insertions, 6 deletions
diff --git a/enc/unicode/10.0.0/name2ctype.h b/enc/unicode/10.0.0/name2ctype.h
index 4a1422d17a..680560707f 100644
--- a/enc/unicode/10.0.0/name2ctype.h
+++ b/enc/unicode/10.0.0/name2ctype.h
@@ -34756,9 +34756,11 @@ struct uniname2ctype_struct {
};
#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
diff --git a/numeric.c b/numeric.c
index c66da93b03..8f0a805c68 100644
--- a/numeric.c
+++ b/numeric.c
@@ -3902,7 +3902,7 @@ rb_int_modulo(VALUE x, VALUE y)
* See Numeric#divmod.
*/
-VALUE
+static VALUE
int_remainder(VALUE x, VALUE y)
{
if (FIXNUM_P(x)) {
diff --git a/tool/enc-unicode.rb b/tool/enc-unicode.rb
index c5c593f617..b0819c35ab 100755
--- a/tool/enc-unicode.rb
+++ b/tool/enc-unicode.rb
@@ -448,9 +448,11 @@ struct uniname2ctype_struct {
};
#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;
%%
diff --git a/vm_backtrace.c b/vm_backtrace.c
index 776f6d188a..8264018da0 100644
--- a/vm_backtrace.c
+++ b/vm_backtrace.c
@@ -693,7 +693,7 @@ rb_ec_backtrace_str_ary(const rb_execution_context_t *ec, long lev, long n)
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);