From: Guido van Rossum Date: Thu, 17 Dec 1992 17:12:48 +0000 (+0000) Subject: Use 'l' as format, not 'i'. X-Git-Tag: v0.9.8~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3346b6ad49e82add093c23a551872d7dd215c240;p=thirdparty%2FPython%2Fcpython.git Use 'l' as format, not 'i'. --- diff --git a/Demo/rpc/xdr.py b/Demo/rpc/xdr.py index b3e514a6d341..1d123dc58b44 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()