mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when trying to pack a negative (in-range) integer.
This commit is contained in:
parent
ccd2283c6f
commit
92b60d55d9
4 changed files with 9 additions and 1 deletions
|
@ -50,7 +50,9 @@ class Packer:
|
|||
def pack_uint(self, x):
|
||||
self.__buf.write(struct.pack('>L', x))
|
||||
|
||||
pack_int = pack_uint
|
||||
def pack_int(self, x):
|
||||
self.__buf.write(struct.pack('>l', x))
|
||||
|
||||
pack_enum = pack_int
|
||||
|
||||
def pack_bool(self, x):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue