Commit 6c6f77d3 authored by Guido van Rossum's avatar Guido van Rossum

Use newer struct, which handles unsigned long right

parent 458fe249
...@@ -199,9 +199,7 @@ def _write_short(f, x): ...@@ -199,9 +199,7 @@ def _write_short(f, x):
f.write(struct.pack('>h', x)) f.write(struct.pack('>h', x))
def _write_long(f, x): def _write_long(f, x):
if x >= 1L<<31: f.write(struct.pack('>L', x))
x = x - (1L<<32)
f.write(struct.pack('>l', x))
def _write_string(f, s): def _write_string(f, s):
f.write(chr(len(s))) f.write(chr(len(s)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment