summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-random
diff options
context:
space:
mode:
authorSanta Zhang <[email protected]>2014-06-24 15:16:13 -0400
committerYukihiro "Matz" Matsumoto <[email protected]>2014-06-25 07:53:23 +0900
commit17ecbaa23db539876626256a540a8966ccec6606 (patch)
tree8a2999426c9845d5f077b2911c0f5f62ac87752a /mrbgems/mruby-random
parentb443bd081a7db579c4d1206bc95df10b34f18af5 (diff)
downloadmruby-17ecbaa23db539876626256a540a8966ccec6606.tar.gz
mruby-17ecbaa23db539876626256a540a8966ccec6606.zip
add a few const qualifier
Diffstat (limited to 'mrbgems/mruby-random')
-rw-r--r--mrbgems/mruby-random/src/mt19937ar.c4
1 files changed, 2 insertions, 2 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 */