diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-07-10 08:12:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-10 08:12:54 (GMT) |
commit | a1fc8d31a7926f024ce5704465efb88ce1b95896 (patch) | |
tree | e8d0e2d6728a3abb693dc105e454fd5103784916 /Objects/tupleobject.c | |
parent | 3824dc9fa31201581595451f416c268a035f5fad (diff) | |
download | cpython-a1fc8d31a7926f024ce5704465efb88ce1b95896.zip cpython-a1fc8d31a7926f024ce5704465efb88ce1b95896.tar.gz cpython-a1fc8d31a7926f024ce5704465efb88ce1b95896.tar.bz2 |
[3.13] GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428) (gh-121565)
GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428)
(cherry picked from commit 9585a1a2a251aaa15baf6579e13dd3be0cb05f1f)
Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r-- | Objects/tupleobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 5ae1ee9..371fb07 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -1132,7 +1132,7 @@ maybe_freelist_pop(Py_ssize_t size) return NULL; } assert(size > 0); - if (size < PyTuple_MAXSAVESIZE) { + if (size <= PyTuple_MAXSAVESIZE) { Py_ssize_t index = size - 1; PyTupleObject *op = TUPLE_FREELIST.items[index]; if (op != NULL) { |