https://github.com/python/cpython/commit/a1fc8d31a7926f024ce5704465efb88ce1b95896 commit: a1fc8d31a7926f024ce5704465efb88ce1b95896 branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: corona10 <[email protected]> date: 2024-07-10T08:12:54Z summary:
[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 <[email protected]> files: A Misc/NEWS.d/next/Core and Builtins/2024-07-08-02-24-55.gh-issue-121439.jDHod3.rst M Objects/tupleobject.c diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-07-08-02-24-55.gh-issue-121439.jDHod3.rst b/Misc/NEWS.d/next/Core and Builtins/2024-07-08-02-24-55.gh-issue-121439.jDHod3.rst new file mode 100644 index 00000000000000..361f9fc71186c6 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2024-07-08-02-24-55.gh-issue-121439.jDHod3.rst @@ -0,0 +1 @@ +Allow tuples of length 20 in the freelist to be reused. diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 5ae1ee9a89af84..371fb074387bbd 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) { _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
