diff options
author | Georg Brandl <georg@python.org> | 2006-03-28 10:07:46 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-03-28 10:07:46 (GMT) |
commit | b921a84405a9c9db7c01ca19533bd98556c7375c (patch) | |
tree | 0c8dd033a130480f1512a645c4d38ee77c1777a9 /Lib/xdrlib.py | |
parent | 686eaeb0b86d7b9113cb1a291775cd711ab023e6 (diff) | |
download | cpython-b921a84405a9c9db7c01ca19533bd98556c7375c.zip cpython-b921a84405a9c9db7c01ca19533bd98556c7375c.tar.gz cpython-b921a84405a9c9db7c01ca19533bd98556c7375c.tar.bz2 |
Make xdrlib use floor division instead of classic division.
Makes test_xdrlib pass.
Diffstat (limited to 'Lib/xdrlib.py')
-rw-r--r-- | Lib/xdrlib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py index 47cc22b..b349eb9 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 |