From afe3ebfa5ce97771b25122738c4153e3536fb8a0 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 11 Jan 1997 19:21:09 +0000 Subject: [PATCH] Use newer struct, which handles unsigned long right --- Lib/aifc.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Lib/aifc.py b/Lib/aifc.py index 2e4b19caa74..ea4f600e7b4 100644 --- a/Lib/aifc.py +++ b/Lib/aifc.py @@ -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)))