summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-12-17 17:12:48 (GMT)
committerGuido van Rossum <guido@python.org>1992-12-17 17:12:48 (GMT)
commit3346b6ad49e82add093c23a551872d7dd215c240 (patch)
tree32e8232bc8007b1df51d9f0dad8073dda8ce9716
parentfa83c7b31b4fd72110bc4c28277e93215f4721a6 (diff)
downloadcpython-3346b6ad49e82add093c23a551872d7dd215c240.zip
cpython-3346b6ad49e82add093c23a551872d7dd215c240.tar.gz
cpython-3346b6ad49e82add093c23a551872d7dd215c240.tar.bz2
Use 'l' as format, not 'i'.
-rw-r--r--Demo/rpc/xdr.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Demo/rpc/xdr.py b/Demo/rpc/xdr.py
index b3e514a..1d123dc 100644
--- a/Demo/rpc/xdr.py
+++ b/Demo/rpc/xdr.py
@@ -92,11 +92,11 @@ class Unpacker:
# as a nonnegative Python int
if x < 0x80000000L: x = int(x)
return x
- if struct.unpack('i', '\0\0\0\1') == 1:
+ if struct.unpack('l', '\0\0\0\1') == 1:
def unpack_uint(self):
i = self.pos
self.pos = j = i+4
- return struct.unpack('i', self.buf[i:j])
+ return struct.unpack('l', self.buf[i:j])
def unpack_int(self):
x = self.unpack_uint()