diff options
Diffstat (limited to 'Python/frame.c')
-rw-r--r-- | Python/frame.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/frame.c b/Python/frame.c index 3d2415f..a5c93ea 100644 --- a/Python/frame.c +++ b/Python/frame.c @@ -99,6 +99,9 @@ take_ownership(PyFrameObject *f, InterpreterFrame *frame) int _PyFrame_Clear(InterpreterFrame * frame, int take) { + /* It is the responsibility of the owning generator/coroutine + * to have cleared the generator pointer */ + assert(frame->generator == NULL); if (frame->frame_obj) { PyFrameObject *f = frame->frame_obj; frame->frame_obj = NULL; |