Skip to content

Commit

Permalink
[prism] Remove escaping C source files
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton authored and hsbt committed Nov 30, 2023
1 parent 3d908a4 commit 7174c62
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions prism/templates/template.rb
Expand Up @@ -360,7 +360,6 @@ def template(name, write_to: nil)
=end
HEADING
else
escape = true
<<~HEADING
/******************************************************************************/
/* This file is generated by the templates/template.rb script and should not */
Expand All @@ -374,9 +373,6 @@ def template(name, write_to: nil)

write_to ||= File.expand_path("../#{name}", __dir__)
contents = heading + erb.result_with_hash(locals)
if escape
(contents = contents.b).gsub!(/[^\t-~]/) {|c| "\\x%.2x" % c.ord}
end

if (extension == ".c" || extension == ".h") && !contents.ascii_only?
# Enforce that we only have ASCII characters here. This is necessary
Expand Down

0 comments on commit 7174c62

Please sign in to comment.