summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--iseq.c2
-rw-r--r--missing/vsnprintf.c4
-rw-r--r--thread.c4
-rw-r--r--time.c4
5 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index b88ac30502..9630a6034b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/iseq.c b/iseq.c
index 24d15575e9..b2a3237f0b 100644
--- a/iseq.c
+++ b/iseq.c
@@ -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'};
/*
diff --git a/thread.c b/thread.c
index 13630b6b02..10c4e3ea73 100644
--- a/thread.c
+++ b/thread.c
@@ -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
diff --git a/time.c b/time.c
index 08f4eb8282..fdf465ceb8 100644
--- a/time.c
+++ b/time.c
@@ -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,