summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-07-10 08:12:54 (GMT)
committerGitHub <noreply@github.com>2024-07-10 08:12:54 (GMT)
commita1fc8d31a7926f024ce5704465efb88ce1b95896 (patch)
treee8d0e2d6728a3abb693dc105e454fd5103784916 /Objects/tupleobject.c
parent3824dc9fa31201581595451f416c268a035f5fad (diff)
downloadcpython-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.c2
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) {