diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-25 07:41:27 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-25 07:41:27 +0900 |
| commit | 8e6fc29aac0b4cd665ef22f992a805a59f2a220a (patch) | |
| tree | 8a2999426c9845d5f077b2911c0f5f62ac87752a /mrbgems | |
| parent | faa3c52a8d083712fe7e8cf41685d56392e35869 (diff) | |
| parent | 8d5f67e6f346353c8134e5aa896f7de6c2a05309 (diff) | |
| download | mruby-8e6fc29aac0b4cd665ef22f992a805a59f2a220a.tar.gz mruby-8e6fc29aac0b4cd665ef22f992a805a59f2a220a.zip | |
Merge pull request #2419 from santazhang/use-const
add a few const qualifier
Diffstat (limited to 'mrbgems')
| -rw-r--r-- | mrbgems/mruby-random/src/mt19937ar.c | 4 | ||||
| -rw-r--r-- | mrbgems/mruby-string-utf8/src/string.c | 2 |
2 files changed, 3 insertions, 3 deletions
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, |
