gh-120834: fix type of *_iframe field in _PyGenObject_HEAD declaration (#120835)

This commit is contained in:
Irit Katriel 2024-06-24 10:23:38 +01:00 committed by GitHub
parent c38e2f64d0
commit 65a12c559c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 81 additions and 79 deletions

View file

@ -112,7 +112,7 @@ _PyFrame_ClearExceptCode(_PyInterpreterFrame *frame)
/* It is the responsibility of the owning generator/coroutine
* to have cleared the enclosing generator, if any. */
assert(frame->owner != FRAME_OWNED_BY_GENERATOR ||
_PyFrame_GetGenerator(frame)->gi_frame_state == FRAME_CLEARED);
_PyGen_GetGeneratorFromFrame(frame)->gi_frame_state == FRAME_CLEARED);
// GH-99729: Clearing this frame can expose the stack (via finalizers). It's
// crucial that this frame has been unlinked, and is no longer visible:
assert(_PyThreadState_GET()->current_frame != frame);