diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | iseq.c | 2 | ||||
-rw-r--r-- | missing/vsnprintf.c | 4 | ||||
-rw-r--r-- | thread.c | 4 | ||||
-rw-r--r-- | time.c | 4 |
5 files changed, 13 insertions, 7 deletions
@@ -1,3 +1,9 @@ +Tue Jul 1 17:44:30 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * iseq.c (COMPILE_OPTION_FALSE), time.c (timegm_noleapsecond), + thread.c (eKillSignal, eTerminateSignal), + missing/vsnprintf.c (BSD_vfprintf): constified. + Tue Jul 1 17:37:43 2008 URABE Shyouhei <shyouhei@ruby-lang.org> * enc/ascii.c: ISO C does not allow extra ';' outside of a @@ -219,7 +219,7 @@ static rb_compile_option_t COMPILE_OPTION_DEFAULT = { OPT_STACK_CACHING, /* int stack_caching; */ OPT_TRACE_INSTRUCTION, /* int trace_instruction */ }; -static const rb_compile_option_t COMPILE_OPTION_FALSE; +static const rb_compile_option_t COMPILE_OPTION_FALSE = {0}; static void make_compile_option(rb_compile_option_t *option, VALUE opt) diff --git a/missing/vsnprintf.c b/missing/vsnprintf.c index dfa0348446..d7545fdf26 100644 --- a/missing/vsnprintf.c +++ b/missing/vsnprintf.c @@ -564,9 +564,9 @@ BSD_vfprintf(FILE *fp, const char *fmt0, va_list ap) * below longer. */ #define PADSIZE 16 /* pad chunk size */ - static char blanks[PADSIZE] = + static const char blanks[PADSIZE] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}; - static char zeroes[PADSIZE] = + static const char zeroes[PADSIZE] = {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}; /* @@ -68,8 +68,8 @@ static void rb_check_deadlock(rb_vm_t *vm); void rb_signal_exec(rb_thread_t *th, int sig); void rb_disable_interrupt(void); -static VALUE eKillSignal = INT2FIX(0); -static VALUE eTerminateSignal = INT2FIX(1); +static const VALUE eKillSignal = INT2FIX(0); +static const VALUE eTerminateSignal = INT2FIX(1); static volatile int system_working = 1; inline static void @@ -494,7 +494,7 @@ leap_year_p(long y) static time_t timegm_noleapsecond(struct tm *tm) { - static int common_year_yday_offset[] = { + static const int common_year_yday_offset[] = { -1, -1 + 31, -1 + 31 + 28, @@ -509,7 +509,7 @@ timegm_noleapsecond(struct tm *tm) -1 + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 /* 1 2 3 4 5 6 7 8 9 10 11 */ }; - static int leap_year_yday_offset[] = { + static const int leap_year_yday_offset[] = { -1, -1 + 31, -1 + 31 + 29, |