gh-111968: Unify naming scheme for freelist (gh-113919)

This commit is contained in:
Donghee Na 2024-01-11 08:51:51 +09:00 committed by GitHub
parent 9d33c23857
commit c65ae26f2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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));