diff --git a/Include/internal/pycore_freelist.h b/Include/internal/pycore_freelist.h index d9619218b8dada..d41153d26a2546 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 2fc57e13f632f8..c05c4fdff83883 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));