Skip to content

Commit

Permalink
Let codegen to write LF newlines on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kenz-gelsoft committed Jun 18, 2022
1 parent 2ae8269 commit cd240a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion codegen2.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def generate_library(classes, config, libname):
is_rust = path.endswith('.rs')
if libname:
path = 'wx-%s/%s' % (libname, path)
with open(path, 'w') as f:
with open(path, 'w', newline='\n') as f:
for chunk in generator(
rust_bindings if is_rust else cxx_bindings,
libname
Expand Down
2 changes: 1 addition & 1 deletion gen_constants_rs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# place wxWidgets doxygen xml files in wxml/ dir and run this.
def main():
outpath = 'wx-base/src/constants.rs'
with open(outpath, 'w') as f:
with open(outpath, 'w', newline='\n') as f:
print(PROLOGUE, file=f)
for file in xml_files_in('wxml/'):
# print(file)
Expand Down

0 comments on commit cd240a0

Please sign in to comment.