mirror of https://github.com/python/cpython
gh-111968: Unify naming scheme for freelist (gh-113919)
This commit is contained in:
parent
9d33c23857
commit
c65ae26f2b
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue