diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2016-04-24 01:52:15 +0900 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2016-06-21 10:56:58 +0200 |
commit | 963e815cb1c3c9989192b2459da9a93518522807 (patch) | |
tree | 95ada8885b7a77a6a76297274e6c693cb7bfe940 /ext | |
parent | 16bd77f50d055dd85acf4e11296141c5e984b350 (diff) | |
download | json-963e815cb1c3c9989192b2459da9a93518522807.tar.gz |
Use enum
Use `enum` instead of `static const int` to get rid of
unused-const-variable warnings.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/json/ext/parser/parser.c | 65 |
1 files changed, 57 insertions, 8 deletions
diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c index 7e32ef0..b1260b3 100644 --- a/ext/json/ext/parser/parser.c +++ b/ext/json/ext/parser/parser.c @@ -102,12 +102,19 @@ static ID i_json_creatable_p, i_json_create, i_create_id, i_create_additions, +<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0 #line 106 "parser.c" static const int JSON_object_start = 1; static const int JSON_object_first_final = 27; static const int JSON_object_error = 0; +======= +#line 92 "parser.c" +enum {JSON_object_start = 1}; +enum {JSON_object_first_final = 27}; +enum {JSON_object_error = 0}; +>>>>>>> Use enum -static const int JSON_object_en_main = 1; +enum {JSON_object_en_main = 1}; #line 165 "parser.rl" @@ -480,12 +487,19 @@ case 26: +<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0 #line 484 "parser.c" static const int JSON_value_start = 1; static const int JSON_value_first_final = 29; static const int JSON_value_error = 0; +======= +#line 470 "parser.c" +enum {JSON_value_start = 1}; +enum {JSON_value_first_final = 29}; +enum {JSON_value_error = 0}; +>>>>>>> Use enum -static const int JSON_value_en_main = 1; +enum {JSON_value_en_main = 1}; #line 285 "parser.rl" @@ -878,12 +892,19 @@ case 28: } +<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0 #line 882 "parser.c" static const int JSON_integer_start = 1; static const int JSON_integer_first_final = 3; static const int JSON_integer_error = 0; +======= +#line 868 "parser.c" +enum {JSON_integer_start = 1}; +enum {JSON_integer_first_final = 3}; +enum {JSON_integer_error = 0}; +>>>>>>> Use enum -static const int JSON_integer_en_main = 1; +enum {JSON_integer_en_main = 1}; #line 309 "parser.rl" @@ -977,12 +998,19 @@ case 5: } +<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0 #line 981 "parser.c" static const int JSON_float_start = 1; static const int JSON_float_first_final = 8; static const int JSON_float_error = 0; +======= +#line 967 "parser.c" +enum {JSON_float_start = 1}; +enum {JSON_float_first_final = 8}; +enum {JSON_float_error = 0}; +>>>>>>> Use enum -static const int JSON_float_en_main = 1; +enum {JSON_float_en_main = 1}; #line 343 "parser.rl" @@ -1143,12 +1171,19 @@ case 7: +<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0 #line 1147 "parser.c" static const int JSON_array_start = 1; static const int JSON_array_first_final = 17; static const int JSON_array_error = 0; +======= +#line 1133 "parser.c" +enum {JSON_array_start = 1}; +enum {JSON_array_first_final = 17}; +enum {JSON_array_error = 0}; +>>>>>>> Use enum -static const int JSON_array_en_main = 1; +enum {JSON_array_en_main = 1}; #line 395 "parser.rl" @@ -1475,12 +1510,19 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd) } +<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0 #line 1479 "parser.c" static const int JSON_string_start = 1; static const int JSON_string_first_final = 8; static const int JSON_string_error = 0; +======= +#line 1465 "parser.c" +enum {JSON_string_start = 1}; +enum {JSON_string_first_final = 8}; +enum {JSON_string_error = 0}; +>>>>>>> Use enum -static const int JSON_string_en_main = 1; +enum {JSON_string_en_main = 1}; #line 508 "parser.rl" @@ -1811,12 +1853,19 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self) } +<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0 #line 1813 "parser.c" static const int JSON_start = 1; static const int JSON_first_final = 10; static const int JSON_error = 0; - -static const int JSON_en_main = 1; +======= +#line 1788 "parser.c" +enum {JSON_start = 1}; +enum {JSON_first_final = 10}; +enum {JSON_error = 0}; +>>>>>>> Use enum + +enum {JSON_en_main = 1}; #line 721 "parser.rl" |