Kaydet (Commit) b921a844 authored tarafından Georg Brandl's avatar Georg Brandl

Make xdrlib use floor division instead of classic division.

Makes test_xdrlib pass.
üst 686eaeb0
......@@ -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
......
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