@@ -89,11 +89,11 @@ static ID i_json_creatable_p, i_json_create, i_create_id, i_create_additions,
8989
9090
9191#line 92 "parser.c"
92- static const int JSON_object_start = 1 ;
93- static const int JSON_object_first_final = 27 ;
94- static const int JSON_object_error = 0 ;
92+ enum { JSON_object_start = 1 } ;
93+ enum { JSON_object_first_final = 27 } ;
94+ enum { JSON_object_error = 0 } ;
9595
96- static const int JSON_object_en_main = 1 ;
96+ enum { JSON_object_en_main = 1 } ;
9797
9898
9999#line 151 "parser.rl"
@@ -467,11 +467,11 @@ case 26:
467467
468468
469469#line 470 "parser.c"
470- static const int JSON_value_start = 1 ;
471- static const int JSON_value_first_final = 21 ;
472- static const int JSON_value_error = 0 ;
470+ enum { JSON_value_start = 1 } ;
471+ enum { JSON_value_first_final = 21 } ;
472+ enum { JSON_value_error = 0 } ;
473473
474- static const int JSON_value_en_main = 1 ;
474+ enum { JSON_value_en_main = 1 } ;
475475
476476
477477#line 271 "parser.rl"
@@ -776,11 +776,11 @@ case 20:
776776
777777
778778#line 779 "parser.c"
779- static const int JSON_integer_start = 1 ;
780- static const int JSON_integer_first_final = 3 ;
781- static const int JSON_integer_error = 0 ;
779+ enum { JSON_integer_start = 1 } ;
780+ enum { JSON_integer_first_final = 3 } ;
781+ enum { JSON_integer_error = 0 } ;
782782
783- static const int JSON_integer_en_main = 1 ;
783+ enum { JSON_integer_en_main = 1 } ;
784784
785785
786786#line 295 "parser.rl"
@@ -875,11 +875,11 @@ case 5:
875875
876876
877877#line 878 "parser.c"
878- static const int JSON_float_start = 1 ;
879- static const int JSON_float_first_final = 8 ;
880- static const int JSON_float_error = 0 ;
878+ enum { JSON_float_start = 1 } ;
879+ enum { JSON_float_first_final = 8 } ;
880+ enum { JSON_float_error = 0 } ;
881881
882- static const int JSON_float_en_main = 1 ;
882+ enum { JSON_float_en_main = 1 } ;
883883
884884
885885#line 329 "parser.rl"
@@ -1041,11 +1041,11 @@ case 7:
10411041
10421042
10431043#line 1044 "parser.c"
1044- static const int JSON_array_start = 1 ;
1045- static const int JSON_array_first_final = 17 ;
1046- static const int JSON_array_error = 0 ;
1044+ enum { JSON_array_start = 1 } ;
1045+ enum { JSON_array_first_final = 17 } ;
1046+ enum { JSON_array_error = 0 } ;
10471047
1048- static const int JSON_array_en_main = 1 ;
1048+ enum { JSON_array_en_main = 1 } ;
10491049
10501050
10511051#line 381 "parser.rl"
@@ -1373,11 +1373,11 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
13731373
13741374
13751375#line 1376 "parser.c"
1376- static const int JSON_string_start = 1 ;
1377- static const int JSON_string_first_final = 8 ;
1378- static const int JSON_string_error = 0 ;
1376+ enum { JSON_string_start = 1 } ;
1377+ enum { JSON_string_first_final = 8 } ;
1378+ enum { JSON_string_error = 0 } ;
13791379
1380- static const int JSON_string_en_main = 1 ;
1380+ enum { JSON_string_en_main = 1 } ;
13811381
13821382
13831383#line 494 "parser.rl"
@@ -1730,11 +1730,11 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
17301730
17311731
17321732#line 1733 "parser.c"
1733- static const int JSON_start = 1 ;
1734- static const int JSON_first_final = 10 ;
1735- static const int JSON_error = 0 ;
1733+ enum { JSON_start = 1 } ;
1734+ enum { JSON_first_final = 10 } ;
1735+ enum { JSON_error = 0 } ;
17361736
1737- static const int JSON_en_main = 1 ;
1737+ enum { JSON_en_main = 1 } ;
17381738
17391739
17401740#line 740 "parser.rl"
@@ -1904,11 +1904,11 @@ case 9:
19041904
19051905
19061906#line 1907 "parser.c"
1907- static const int JSON_quirks_mode_start = 1 ;
1908- static const int JSON_quirks_mode_first_final = 10 ;
1909- static const int JSON_quirks_mode_error = 0 ;
1907+ enum { JSON_quirks_mode_start = 1 } ;
1908+ enum { JSON_quirks_mode_first_final = 10 } ;
1909+ enum { JSON_quirks_mode_error = 0 } ;
19101910
1911- static const int JSON_quirks_mode_en_main = 1 ;
1911+ enum { JSON_quirks_mode_en_main = 1 } ;
19121912
19131913
19141914#line 778 "parser.rl"
@@ -2094,8 +2094,7 @@ static VALUE cParser_parse(VALUE self)
20942094
20952095static JSON_Parser * JSON_allocate (void )
20962096{
2097- JSON_Parser * json = ALLOC (JSON_Parser );
2098- MEMZERO (json , JSON_Parser , 1 );
2097+ JSON_Parser * json = ZALLOC (JSON_Parser );
20992098 json -> fbuffer = fbuffer_alloc (0 );
21002099 return json ;
21012100}
@@ -2164,7 +2163,7 @@ static VALUE cParser_quirks_mode_p(VALUE self)
21642163}
21652164
21662165
2167- void Init_parser ()
2166+ void Init_parser (void )
21682167{
21692168 rb_require ("json/common" );
21702169 mJSON = rb_define_module ("JSON" );
0 commit comments