* iseq.c (COMPILE_OPTION_FALSE), time.c (timegm_noleapsecond),

thread.c (eKillSignal, eTerminateSignal),
  missing/vsnprintf.c (BSD_vfprintf): constified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-07-01 08:44:32 +00:00
Родитель 53cffba8cb
Коммит 5669377a57
5 изменённых файлов: 13 добавлений и 7 удалений

Просмотреть файл

@ -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

2
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)

Просмотреть файл

@ -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

4
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,