From 17ecbaa23db539876626256a540a8966ccec6606 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 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mrbgems/mruby-random/src') 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 */ -- cgit v1.2.3