Skip to content

Commit

Permalink
Fix current_frame
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Jun 5, 2024
1 parent 00611d7 commit b65558e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/greenlet/TPythonState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ void PythonState::operator<<(const PyThreadState *const tstate) noexcept
#else // not 312
this->recursion_depth = tstate->recursion_limit - tstate->recursion_remaining;
#endif // GREENLET_PY312
#if GREENLET_USE_CFRAME
#if GREENLET_PY313
this->current_frame = tstate->current_frame;
#elif GREENLET_USE_CFRAME
this->current_frame = tstate->cframe->current_frame;
#endif
this->datastack_chunk = tstate->datastack_chunk;
Expand Down Expand Up @@ -212,7 +214,9 @@ void PythonState::operator>>(PyThreadState *const tstate) noexcept
#else // \/ 3.11
tstate->recursion_remaining = tstate->recursion_limit - this->recursion_depth;
#endif // GREENLET_PY312
#if GREENLET_USE_CFRAME
#if GREENLET_PY313
tstate->current_frame = this->current_frame;
#elif GREENLET_USE_CFRAME
tstate->cframe->current_frame = this->current_frame;
#endif
tstate->datastack_chunk = this->datastack_chunk;
Expand Down

0 comments on commit b65558e

Please sign in to comment.