mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
Merge branch 'icecc' into 'main'
data-to-c.py: generate new-line at the end of the file See merge request GNOME/glib!2174
This commit is contained in:
commit
847f3e36db
@ -11,7 +11,7 @@ with open(sys.argv[1], "r", encoding="utf-8", errors="backslashreplace") as f:
|
||||
b = [r"\x{:02x}".format(ord(c)) for c in in_data]
|
||||
|
||||
out_data = 'const char {0}[] = "'.format(sys.argv[2])
|
||||
out_data += "".join(b) + '";'
|
||||
out_data += "".join(b) + '";\n'
|
||||
|
||||
with open(sys.argv[3], "w") as f:
|
||||
f.write(out_data)
|
||||
|
Loading…
Reference in New Issue
Block a user