mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #12744: Fix inefficient representation of integers
between 2**31 and 2**63 on systems with a 64-bit C "long".
This commit is contained in:
parent
780199e6a3
commit
3c7e928098
3 changed files with 14 additions and 1 deletions
|
@ -1540,7 +1540,7 @@ save_long(PicklerObject *self, PyObject *obj)
|
|||
/* out of range for int pickling */
|
||||
PyErr_Clear();
|
||||
}
|
||||
else
|
||||
else if (val <= 0x7fffffffL && val >= -0x80000000L)
|
||||
return save_int(self, val);
|
||||
|
||||
if (self->proto >= 2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue