mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-15 19:05:32 +00:00
xxd.py: always write \n line endings
Previously, `open()` was used with the default option of `newline=None`, which means that “any '\n' characters written are translated to the system default line separator”. Now, `xxd.py` always writes `\n` line endings. This eliminates the need for the .gitattributes file.
This commit is contained in:
committed by
Sam Lantinga
parent
723bcd0a8b
commit
796713b9d5
@@ -17,7 +17,7 @@ def main():
|
||||
|
||||
binary_data = args.input.open("rb").read()
|
||||
|
||||
with args.output.open("w") as fout:
|
||||
with args.output.open("w", newline="\n") as fout:
|
||||
fout.write("unsigned char {}[] = {{\n".format(varname))
|
||||
bytes_written = 0
|
||||
while bytes_written < len(binary_data):
|
||||
|
||||
Reference in New Issue
Block a user