Skip to content

Commit eb2d582

Browse files
authored
Update Python script to Python 3 (#117)
1 parent d9825fa commit eb2d582

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/build-asm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ def munge_file(pp_arch, pp_platform, source_lines, sink):
185185
"""
186186
Wraps a single assembly file in appropriate defines.
187187
"""
188-
sink.write("#if defined(%s) && defined(%s)\n" % (pp_arch, pp_platform))
188+
sink.write(b"#if defined(%b) && defined(%b)\n" % (pp_arch.encode(), pp_platform.encode()))
189189
for line in source_lines:
190190
sink.write(line)
191191

192-
sink.write("#endif // defined(%s) && defined(%s)\n" % (pp_arch, pp_platform))
192+
sink.write(b"#endif // defined(%b) && defined(%b)\n" % (pp_arch.encode(), pp_platform.encode()))
193193

194194

195195
def munge_all_files(osname, arch, asms):
@@ -214,10 +214,10 @@ def main():
214214
# Now we need to bring over all the .S files, inserting our preprocessor
215215
# directives along the way. We do this to allow the C preprocessor to make
216216
# unneeded assembly files vanish.
217-
for ((osname, arch), asm_files) in asm_outputs.iteritems():
217+
for ((osname, arch), asm_files) in asm_outputs.items():
218218
munge_all_files(osname, arch, asm_files)
219219

220-
for ((osname, arch), asm_files) in NON_PERL_FILES.iteritems():
220+
for ((osname, arch), asm_files) in NON_PERL_FILES.items():
221221
for asm_file in asm_files:
222222
with open(asm_file, 'rb') as f:
223223
lines = f.readlines()

0 commit comments

Comments
 (0)