mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
gh-111968: Unify freelist naming schema to Eric's suggestion (gh-114581)
This commit is contained in:
parent
504334c7be
commit
699779256e
8 changed files with 25 additions and 25 deletions
|
@ -69,7 +69,7 @@ static struct _Py_context_state *
|
|||
get_context_state(void)
|
||||
{
|
||||
_PyFreeListState *state = _PyFreeListState_GET();
|
||||
return &state->context_state;
|
||||
return &state->contexts;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1270,7 +1270,7 @@ void
|
|||
_PyContext_ClearFreeList(_PyFreeListState *freelist_state, int is_finalization)
|
||||
{
|
||||
#ifdef WITH_FREELISTS
|
||||
struct _Py_context_state *state = &freelist_state->context_state;
|
||||
struct _Py_context_state *state = &freelist_state->contexts;
|
||||
for (; state->numfree > 0; state->numfree--) {
|
||||
PyContext *ctx = state->freelist;
|
||||
state->freelist = (PyContext *)ctx->ctx_weakreflist;
|
||||
|
|
|
@ -12,7 +12,7 @@ static struct _Py_object_stack_state *
|
|||
get_state(void)
|
||||
{
|
||||
_PyFreeListState *state = _PyFreeListState_GET();
|
||||
return &state->object_stack_state;
|
||||
return &state->object_stacks;
|
||||
}
|
||||
|
||||
_PyObjectStackChunk *
|
||||
|
@ -76,7 +76,7 @@ _PyObjectStackChunk_ClearFreeList(_PyFreeListState *free_lists, int is_finalizat
|
|||
return;
|
||||
}
|
||||
|
||||
struct _Py_object_stack_state *state = &free_lists->object_stack_state;
|
||||
struct _Py_object_stack_state *state = &free_lists->object_stacks;
|
||||
while (state->numfree > 0) {
|
||||
_PyObjectStackChunk *buf = state->free_list;
|
||||
state->free_list = buf->prev;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue