summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2016-04-24 01:52:15 +0900
committerFlorian Frank <flori@ping.de>2016-06-21 10:56:58 +0200
commit963e815cb1c3c9989192b2459da9a93518522807 (patch)
tree95ada8885b7a77a6a76297274e6c693cb7bfe940 /Rakefile
parent16bd77f50d055dd85acf4e11296141c5e984b350 (diff)
downloadjson-963e815cb1c3c9989192b2459da9a93518522807.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