]> granicus.if.org Git - python/commitdiff
Use newer struct, which handles unsigned long right
authorGuido van Rossum <guido@python.org>
Sat, 11 Jan 1997 19:21:09 +0000 (19:21 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 11 Jan 1997 19:21:09 +0000 (19:21 +0000)
Lib/aifc.py

index 2e4b19caa74d717a431cd7864a86c9851b2a67f5..ea4f600e7b4c2dd8ccbdb6db57aba4c2e3591fde 100644 (file)
@@ -199,9 +199,7 @@ def _write_short(f, x):
        f.write(struct.pack('>h', x))
 
 def _write_long(f, x):
-       if x >= 1L<<31:
-               x = x - (1L<<32)
-       f.write(struct.pack('>l', x))
+       f.write(struct.pack('>L', x))
 
 def _write_string(f, s):
        f.write(chr(len(s)))