ruby-changes:6256
From: nobu <ko1@a...>
Date: Tue, 1 Jul 2008 17:44:50 +0900 (JST)
Subject: [ruby-changes:6256] Ruby:r17769 (trunk): * iseq.c (COMPILE_OPTION_FALSE), time.c (timegm_noleapsecond),
nobu 2008-07-01 17:44:32 +0900 (Tue, 01 Jul 2008)
New Revision: 17769
Modified files:
trunk/ChangeLog
trunk/iseq.c
trunk/missing/vsnprintf.c
trunk/thread.c
trunk/time.c
Log:
* iseq.c (COMPILE_OPTION_FALSE), time.c (timegm_noleapsecond),
thread.c (eKillSignal, eTerminateSignal),
missing/vsnprintf.c (BSD_vfprintf): constified.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=17769
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/time.c?r1=17769&r2=17768&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17769&r2=17768&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread.c?r1=17769&r2=17768&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/iseq.c?r1=17769&r2=17768&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/missing/vsnprintf.c?r1=17769&r2=17768&diff_format=u
Index: time.c
===================================================================
--- time.c (revision 17768)
+++ time.c (revision 17769)
@@ -494,7 +494,7 @@
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 @@
-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,
Index: ChangeLog
===================================================================
--- ChangeLog (revision 17768)
+++ ChangeLog (revision 17769)
@@ -1,3 +1,9 @@
+Tue Jul 1 17:44:30 2008 Nobuyoshi Nakada <nobu@r...>
+
+ * 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@r...>
* enc/ascii.c: ISO C does not allow extra ';' outside of a
Index: iseq.c
===================================================================
--- iseq.c (revision 17768)
+++ iseq.c (revision 17769)
@@ -219,7 +219,7 @@
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)
Index: thread.c
===================================================================
--- thread.c (revision 17768)
+++ thread.c (revision 17769)
@@ -68,8 +68,8 @@
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
Index: missing/vsnprintf.c
===================================================================
--- missing/vsnprintf.c (revision 17768)
+++ missing/vsnprintf.c (revision 17769)
@@ -564,9 +564,9 @@
* 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'};
/*
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/