mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
bpo-46361: Fix "small" int
caching (GH-30583)
This commit is contained in:
parent
09087b8519
commit
5cd9a162cd
5 changed files with 24 additions and 1 deletions
|
@ -911,7 +911,7 @@ _PyLong_FromByteArray(const unsigned char* bytes, size_t n,
|
|||
}
|
||||
|
||||
Py_SET_SIZE(v, is_signed ? -idigit : idigit);
|
||||
return (PyObject *)long_normalize(v);
|
||||
return (PyObject *)maybe_small_long(long_normalize(v));
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue