Skip to content

Commit

Permalink
pythongh-111968: Unify naming scheme for freelist (pythongh-113919)
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 authored and Glyphack committed Jan 27, 2024
1 parent f045424 commit 6852eb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Include/internal/pycore_freelist.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Objects/listobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ get_list_state(void)
{
_PyFreeListState *state = _PyFreeListState_GET();
assert(state != NULL);
return &state->list;
return &state->list_state;
}
#endif

Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 6852eb9

Please sign in to comment.