summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-10-05 07:00:07 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-25 16:51:04 +0900
commit0baa541081e0ceaf2f8af283d40462654557ea16 (patch)
treee8af79eb0e8e496dc80281ff84bb86976d994c5f
parente1d0af6ca7f9e32e3ac7b66f286a7f02283a3cd3 (diff)
downloadjson-0baa541081e0ceaf2f8af283d40462654557ea16.tar.gz
ext/json/parser/prereq.mk: Add a "automatically generated" header
to parser.c. ruby/ruby@5717e55e9a7790c938afa694a9bf558c0e54bb83 ruby/ruby@70e3fda2eb45c841e5fb4574273d20f8df5455e5
-rw-r--r--Rakefile1
-rw-r--r--ext/json/ext/parser/parser.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index 7e307dc..2b68818 100644
--- a/Rakefile
+++ b/Rakefile
@@ -331,6 +331,7 @@ else
end
src = File.read("parser.c").gsub(/[ \t]+$/, '')
src.gsub!(/^static const int (JSON_.*=.*);$/, 'enum {\1};')
+ src[0, 0] = "/* This file is automatically generated from parser.rl by using ragel */"
File.open("parser.c", "w") {|f| f.print src}
end
end
diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c
index bc4ac46..0f98cf9 100644
--- a/ext/json/ext/parser/parser.c
+++ b/ext/json/ext/parser/parser.c
@@ -1,4 +1,4 @@
-
+/* This file is automatically generated from parser.rl by using ragel */
#line 1 "parser.rl"
#include "../fbuffer/fbuffer.h"
#include "parser.h"