Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit afe3ebf

Browse files
committed
Use newer struct, which handles unsigned long right
1 parent fe27a50 commit afe3ebf

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Lib/aifc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@ def _write_short(f, x):
199199
f.write(struct.pack('>h', x))
200200

201201
def _write_long(f, x):
202-
if x >= 1L<<31:
203-
x = x - (1L<<32)
204-
f.write(struct.pack('>l', x))
202+
f.write(struct.pack('>L', x))
205203

206204
def _write_string(f, s):
207205
f.write(chr(len(s)))

0 commit comments

Comments
 (0)