Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-111968: Unify naming scheme for freelist #113919

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading