From 8d5f67e6f346353c8134e5aa896f7de6c2a05309 Mon Sep 17 00:00:00 2001 From: Santa Zhang Date: Tue, 24 Jun 2014 15:16:13 -0400 Subject: add a few const qualifier --- mrbgems/mruby-random/src/mt19937ar.c | 4 ++-- mrbgems/mruby-string-utf8/src/string.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mrbgems') diff --git a/mrbgems/mruby-random/src/mt19937ar.c b/mrbgems/mruby-random/src/mt19937ar.c index 0e1279b34..310a276fa 100644 --- a/mrbgems/mruby-random/src/mt19937ar.c +++ b/mrbgems/mruby-random/src/mt19937ar.c @@ -32,7 +32,7 @@ void mrb_random_init_genrand(mt_state *t, unsigned long s) unsigned long mrb_random_genrand_int32(mt_state *t) { unsigned long y; - static unsigned long mag01[2]={0x0UL, MATRIX_A}; + static const unsigned long mag01[2]={0x0UL, MATRIX_A}; /* mag01[x] = x * MATRIX_A for x=0,1 */ if (t->mti >= N) { /* generate N words at one time */ @@ -126,7 +126,7 @@ void init_by_array(unsigned long init_key[], int key_length) unsigned long genrand_int32(void) { unsigned long y; - static unsigned long mag01[2]={0x0UL, MATRIX_A}; + static const unsigned long mag01[2]={0x0UL, MATRIX_A}; /* mag01[x] = x * MATRIX_A for x=0,1 */ if (mti >= N) { /* generate N words at one time */ diff --git a/mrbgems/mruby-string-utf8/src/string.c b/mrbgems/mruby-string-utf8/src/string.c index 874fa8dbb..67f54ee02 100644 --- a/mrbgems/mruby-string-utf8/src/string.c +++ b/mrbgems/mruby-string-utf8/src/string.c @@ -19,7 +19,7 @@ static const char utf8len_codepage[256] = 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1, }; -static char utf8len_codepage_zero[256] = +static const char utf8len_codepage_zero[256] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -- cgit v1.2.3