Skip to content

Commit

Permalink
* iseq.c (COMPILE_OPTION_FALSE), time.c (timegm_noleapsecond),
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
nobu committed Jul 1, 2008
1 parent 53cffba commit 5669377
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Tue Jul 1 17:44:30 2008 Nobuyoshi Nakada <[email protected]>

* 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 <[email protected]>

* enc/ascii.c: ISO C does not allow extra ';' outside of a
Expand Down
2 changes: 1 addition & 1 deletion iseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions missing/vsnprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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'};

/*
Expand Down
4 changes: 2 additions & 2 deletions thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 5669377

Please sign in to comment.