Commit 8d5f67e6 authored by Santa Zhang's avatar Santa Zhang

add a few const qualifier

parent faa3c52a
......@@ -91,7 +91,7 @@ typedef short mrb_sym;
# define PRIo64 "I64o"
# define PRIx64 "I64x"
# define PRIX64 "I64X"
static unsigned int IEEE754_INFINITY_BITS_SINGLE = 0x7F800000;
static const unsigned int IEEE754_INFINITY_BITS_SINGLE = 0x7F800000;
# define INFINITY (*(float *)&IEEE754_INFINITY_BITS_SINGLE)
# define NAN ((float)(INFINITY - INFINITY))
# else
......
......@@ -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 */
......
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment