summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2016-04-24 01:52:15 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2016-04-24 02:34:34 +0900
commitd1389fa3c173fcb934bf0dc1f0a51083ae9e782f (patch)
tree015ba2051d7112013f8d9e7b98e366cf69582a71 /Rakefile
parent5bf9d8439841978b6dbad381fb8f62ea61887acc (diff)
downloadjson-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--Rakefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 4aa311e..4448d2e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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