diff options
Diffstat (limited to 'Python/context.c')
-rw-r--r-- | Python/context.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/context.c b/Python/context.c index 01a21b4..3937819 100644 --- a/Python/context.c +++ b/Python/context.c @@ -344,8 +344,8 @@ _context_alloc(void) struct _Py_context_freelist *context_freelist = get_context_freelist(); if (context_freelist->numfree > 0) { context_freelist->numfree--; - ctx = context_freelist->freelist; - context_freelist->freelist = (PyContext *)ctx->ctx_weakreflist; + ctx = context_freelist->items; + context_freelist->items = (PyContext *)ctx->ctx_weakreflist; OBJECT_STAT_INC(from_freelist); ctx->ctx_weakreflist = NULL; _Py_NewReference((PyObject *)ctx); @@ -471,8 +471,8 @@ context_tp_dealloc(PyContext *self) struct _Py_context_freelist *context_freelist = get_context_freelist(); if (context_freelist->numfree >= 0 && context_freelist->numfree < PyContext_MAXFREELIST) { context_freelist->numfree++; - self->ctx_weakreflist = (PyObject *)context_freelist->freelist; - context_freelist->freelist = self; + self->ctx_weakreflist = (PyObject *)context_freelist->items; + context_freelist->items = self; OBJECT_STAT_INC(to_freelist); } else @@ -1272,8 +1272,8 @@ _PyContext_ClearFreeList(struct _Py_object_freelists *freelists, int is_finaliza #ifdef WITH_FREELISTS struct _Py_context_freelist *state = &freelists->contexts; for (; state->numfree > 0; state->numfree--) { - PyContext *ctx = state->freelist; - state->freelist = (PyContext *)ctx->ctx_weakreflist; + PyContext *ctx = state->items; + state->items = (PyContext *)ctx->ctx_weakreflist; ctx->ctx_weakreflist = NULL; PyObject_GC_Del(ctx); } |