diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2016-04-24 01:52:15 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2016-04-24 02:34:34 +0900 |
commit | d1389fa3c173fcb934bf0dc1f0a51083ae9e782f (patch) | |
tree | 015ba2051d7112013f8d9e7b98e366cf69582a71 /Rakefile | |
parent | 5bf9d8439841978b6dbad381fb8f62ea61887acc (diff) | |
download | json-d1389fa3c173fcb934bf0dc1f0a51083ae9e782f.tar.gz |
Use enum
Use `enum` instead of `static const int` to get rid of
unused-const-variable warnings.
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -361,6 +361,7 @@ else sh "ragel -x parser.rl | #{RAGEL_CODEGEN} -G2" end src = File.read("parser.c").gsub(/[ \t]+$/, '') + src.gsub!(/^static const int (JSON_.*=.*);$/, 'enum {\1};') File.open("parser.c", "w") {|f| f.print src} end end |