diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-10-05 07:00:07 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-06-25 16:51:04 +0900 |
commit | 0baa541081e0ceaf2f8af283d40462654557ea16 (patch) | |
tree | e8af79eb0e8e496dc80281ff84bb86976d994c5f | |
parent | e1d0af6ca7f9e32e3ac7b66f286a7f02283a3cd3 (diff) | |
download | json-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-- | Rakefile | 1 | ||||
-rw-r--r-- | ext/json/ext/parser/parser.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -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" |