There was an error while loading. Please reload this page.
1 parent f621618 commit 9585a1aCopy full SHA for 9585a1a
2 files changed
Misc/NEWS.d/next/Core and Builtins/2024-07-08-02-24-55.gh-issue-121439.jDHod3.rst
@@ -0,0 +1 @@
1
+Allow tuples of length 20 in the freelist to be reused.
Objects/tupleobject.c
@@ -1153,7 +1153,7 @@ maybe_freelist_pop(Py_ssize_t size)
1153
return NULL;
1154
}
1155
assert(size > 0);
1156
- if (size < PyTuple_MAXSAVESIZE) {
+ if (size <= PyTuple_MAXSAVESIZE) {
1157
Py_ssize_t index = size - 1;
1158
PyTupleObject *op = TUPLE_FREELIST.items[index];
1159
if (op != NULL) {
0 commit comments