]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use 'l' as format, not 'i'.
authorGuido van Rossum <guido@python.org>
Thu, 17 Dec 1992 17:12:48 +0000 (17:12 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 17 Dec 1992 17:12:48 +0000 (17:12 +0000)
Demo/rpc/xdr.py

index b3e514a6d341c5acbaccd36a6f67a47fe4176fad..1d123dc58b44861619ccbdbf8b774c96eedd9e77 100644 (file)
@@ -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()