comparison roundup/msgfmt.py @ 5380:64c4e43fbb84

Python 3 preparation: numeric literal syntax. Fixes octal constants to use leading 0o, and removes 'L' suffixes. Tool-assisted patch.
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 21:43:32 +0000
parents 64b05e24dbd8
children 23b8e6067f7c
comparison
equal deleted inserted replaced
5379:17edccfe1755 5380:64c4e43fbb84
83 for o1, l1, o2, l2 in offsets: 83 for o1, l1, o2, l2 in offsets:
84 koffsets += [l1, o1+keystart] 84 koffsets += [l1, o1+keystart]
85 voffsets += [l2, o2+valuestart] 85 voffsets += [l2, o2+valuestart]
86 offsets = koffsets + voffsets 86 offsets = koffsets + voffsets
87 output = struct.pack("Iiiiiii", 87 output = struct.pack("Iiiiiii",
88 0x950412deL, # Magic 88 0x950412de, # Magic
89 0, # Version 89 0, # Version
90 len(keys), # # of entries 90 len(keys), # # of entries
91 7*4, # start of key index 91 7*4, # start of key index
92 7*4+len(keys)*8, # start of value index 92 7*4+len(keys)*8, # start of value index
93 0, 0) # size and offset of hash table 93 0, 0) # size and offset of hash table

Roundup Issue Tracker: http://roundup-tracker.org/