summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
authorDonghee Na <donghee.na@python.org>2024-02-16 01:01:36 (GMT)
committerGitHub <noreply@github.com>2024-02-16 01:01:36 (GMT)
commit321d13fd2b858d76cd4cbd03e6d8c4cba307449e (patch)
treefa0dca34a9aad53cb6b156c88cae5872c77987e8 /Objects/tupleobject.c
parent454d7963e31cded1de3a90642da7259848efd232 (diff)
downloadcpython-321d13fd2b858d76cd4cbd03e6d8c4cba307449e.zip
cpython-321d13fd2b858d76cd4cbd03e6d8c4cba307449e.tar.gz
cpython-321d13fd2b858d76cd4cbd03e6d8c4cba307449e.tar.bz2
gh-111968: Split _Py_dictkeys_freelist out of _Py_dict_freelist (gh-115505)
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r--Objects/tupleobject.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 1cdf79d..d9dc00d 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -1134,11 +1134,11 @@ maybe_freelist_pop(Py_ssize_t size)
assert(size > 0);
if (size < PyTuple_MAXSAVESIZE) {
Py_ssize_t index = size - 1;
- PyTupleObject *op = TUPLE_FREELIST.free_list[index];
+ PyTupleObject *op = TUPLE_FREELIST.items[index];
if (op != NULL) {
/* op is the head of a linked list, with the first item
pointing to the next node. Here we pop off the old head. */
- TUPLE_FREELIST.free_list[index] = (PyTupleObject *) op->ob_item[0];
+ TUPLE_FREELIST.items[index] = (PyTupleObject *) op->ob_item[0];
TUPLE_FREELIST.numfree[index]--;
/* Inlined _PyObject_InitVar() without _PyType_HasFeature() test */
#ifdef Py_TRACE_REFS
@@ -1173,8 +1173,8 @@ maybe_freelist_push(PyTupleObject *op)
{
/* op is the head of a linked list, with the first item
pointing to the next node. Here we set op as the new head. */
- op->ob_item[0] = (PyObject *) TUPLE_FREELIST.free_list[index];
- TUPLE_FREELIST.free_list[index] = op;
+ op->ob_item[0] = (PyObject *) TUPLE_FREELIST.items[index];
+ TUPLE_FREELIST.items[index] = op;
TUPLE_FREELIST.numfree[index]++;
OBJECT_STAT_INC(to_freelist);
return 1;
@@ -1188,8 +1188,8 @@ maybe_freelist_clear(struct _Py_object_freelists *freelists, int fini)
{
#ifdef WITH_FREELISTS
for (Py_ssize_t i = 0; i < PyTuple_NFREELISTS; i++) {
- PyTupleObject *p = TUPLE_FREELIST.free_list[i];
- TUPLE_FREELIST.free_list[i] = NULL;
+ PyTupleObject *p = TUPLE_FREELIST.items[i];
+ TUPLE_FREELIST.items[i] = NULL;
TUPLE_FREELIST.numfree[i] = fini ? -1 : 0;
while (p) {
PyTupleObject *q = p;