diff options
author | Mark Shannon <mark@hotpy.org> | 2023-08-17 10:16:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-17 10:16:03 (GMT) |
commit | 006e44f9502308ec3d14424ad8bd774046f2be8e (patch) | |
tree | 91ab71678a0fb5f5ba410c371f28ded8a1c82d0d /Python/pystate.c | |
parent | 33e6e3fec02ff3035dec52692542d3dd10124bef (diff) | |
download | cpython-006e44f9502308ec3d14424ad8bd774046f2be8e.zip cpython-006e44f9502308ec3d14424ad8bd774046f2be8e.tar.gz cpython-006e44f9502308ec3d14424ad8bd774046f2be8e.tar.bz2 |
GH-108035: Remove the `_PyCFrame` struct as it is no longer needed for performance. (GH-108036)
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 3a05cb0..01651d7 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -1310,7 +1310,7 @@ init_threadstate(PyThreadState *tstate, // This is cleared when PyGILState_Ensure() creates the thread state. tstate->gilstate_counter = 1; - tstate->cframe = &tstate->root_cframe; + tstate->current_frame = NULL; tstate->datastack_chunk = NULL; tstate->datastack_top = NULL; tstate->datastack_limit = NULL; @@ -1452,7 +1452,7 @@ PyThreadState_Clear(PyThreadState *tstate) int verbose = _PyInterpreterState_GetConfig(tstate->interp)->verbose; - if (verbose && tstate->cframe->current_frame != NULL) { + if (verbose && tstate->current_frame != NULL) { /* bpo-20526: After the main thread calls _PyInterpreterState_SetFinalizing() in Py_FinalizeEx() (or in Py_EndInterpreter() for subinterpreters), @@ -1953,7 +1953,7 @@ _PyThread_CurrentFrames(void) for (i = runtime->interpreters.head; i != NULL; i = i->next) { PyThreadState *t; for (t = i->threads.head; t != NULL; t = t->next) { - _PyInterpreterFrame *frame = t->cframe->current_frame; + _PyInterpreterFrame *frame = t->current_frame; frame = _PyFrame_GetFirstComplete(frame); if (frame == NULL) { continue; |