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>
--- /dev/null
+Allow tuples of length 20 in the freelist to be reused.
return NULL;
}
assert(size > 0);
- if (size < PyTuple_MAXSAVESIZE) {
+ if (size <= PyTuple_MAXSAVESIZE) {
Py_ssize_t index = size - 1;
PyTupleObject *op = STATE.free_list[index];
if (op != NULL) {