From c65ae26f2b46ca616a7ca000bbfcdf63b9bdd779 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Thu, 11 Jan 2024 08:51:51 +0900 Subject: [PATCH] gh-111968: Unify naming scheme for freelist (gh-113919) --- Include/internal/pycore_freelist.h | 2 +- Objects/listobject.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Include/internal/pycore_freelist.h b/Include/internal/pycore_freelist.h index d9619218b8d..d41153d26a2 100644 --- a/Include/internal/pycore_freelist.h +++ b/Include/internal/pycore_freelist.h @@ -36,7 +36,7 @@ struct _Py_float_state { typedef struct _Py_freelist_state { struct _Py_float_state float_state; - struct _Py_list_state list; + struct _Py_list_state list_state; } _PyFreeListState; #ifdef __cplusplus diff --git a/Objects/listobject.c b/Objects/listobject.c index 2fc57e13f63..c05c4fdff83 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -26,7 +26,7 @@ get_list_state(void) { _PyFreeListState *state = _PyFreeListState_GET(); assert(state != NULL); - return &state->list; + return &state->list_state; } #endif @@ -124,7 +124,7 @@ void _PyList_ClearFreeList(_PyFreeListState *freelist_state, int is_finalization) { #if PyList_MAXFREELIST > 0 - struct _Py_list_state *state = &freelist_state->list; + struct _Py_list_state *state = &freelist_state->list_state; while (state->numfree > 0) { PyListObject *op = state->free_list[--state->numfree]; assert(PyList_CheckExact(op));