Skip to content

Commit

Permalink
util/import_unicode.py: Ensure output is deterministic
Browse files Browse the repository at this point in the history
Ensure the generated unidata.c file is deterministic by sorting the
keys of the dict.

Signed-off-by: Alexander Kanavin <[email protected]>
Reviewed-by: Daniel Kiper <[email protected]>
  • Loading branch information
kanavin authored and Daniel Kiper committed Jun 13, 2023
1 parent 87648e9 commit 4ffe639
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/import_unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@

outfile.write ("struct grub_unicode_arabic_shape grub_unicode_arabic_shapes[] = {\n ")

for x in arabicsubst:
for x in sorted(arabicsubst):
try:
if arabicsubst[x]['join'] == "DUAL":
outfile.write ("{0x%x, 0x%x, 0x%x, 0x%x, 0x%x},\n " % (arabicsubst[x][0], arabicsubst[x][1], arabicsubst[x][2], arabicsubst[x][3], arabicsubst[x][4]))
Expand Down

0 comments on commit 4ffe639

Please sign in to comment.