From: Georg Brandl Date: Tue, 28 Mar 2006 10:07:46 +0000 (+0000) Subject: Make xdrlib use floor division instead of classic division. X-Git-Tag: v2.5a0~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b921a84405a9c9db7c01ca19533bd98556c7375c;p=thirdparty%2FPython%2Fcpython.git Make xdrlib use floor division instead of classic division. Makes test_xdrlib pass. --- diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py index 47cc22b2e6ca..b349eb9b7949 100644 --- a/Lib/xdrlib.py +++ b/Lib/xdrlib.py @@ -80,7 +80,7 @@ class Packer: if n < 0: raise ValueError, 'fstring size must be nonnegative' data = s[:n] - n = ((n+3)/4)*4 + n = ((n+3)//4)*4 data = data + (n - len(data)) * '\0' self.__buf.write(data) @@ -192,7 +192,7 @@ class Unpacker: if n < 0: raise ValueError, 'fstring size must be nonnegative' i = self.__pos - j = i + (n+3)/4*4 + j = i + (n+3)//4*4 if j > len(self.__buf): raise EOFError self.__pos = j