Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3346b6a

Browse files
committed
Use 'l' as format, not 'i'.
1 parent fa83c7b commit 3346b6a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Demo/rpc/xdr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ def unpack_uint(self):
9292
# as a nonnegative Python int
9393
if x < 0x80000000L: x = int(x)
9494
return x
95-
if struct.unpack('i', '\0\0\0\1') == 1:
95+
if struct.unpack('l', '\0\0\0\1') == 1:
9696
def unpack_uint(self):
9797
i = self.pos
9898
self.pos = j = i+4
99-
return struct.unpack('i', self.buf[i:j])
99+
return struct.unpack('l', self.buf[i:j])
100100

101101
def unpack_int(self):
102102
x = self.unpack_uint()

0 commit comments

Comments
 (0)