8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 084c91a commit eafd6b1Copy full SHA for eafd6b1
Objects/genobject.c
@@ -378,17 +378,19 @@ static PyObject *
378
gen_close(PyGenObject *gen, PyObject *args)
379
{
380
PyObject *retval;
381
+ PyObject *yf = _PyGen_yf(gen);
382
int err = 0;
383
384
if (gen->gi_frame_state == FRAME_CREATED) {
385
+ assert(yf == NULL);
386
gen->gi_frame_state = FRAME_COMPLETED;
387
Py_RETURN_NONE;
388
}
389
if (gen->gi_frame_state >= FRAME_COMPLETED) {
390
391
392
393
- PyObject *yf = _PyGen_yf(gen);
394
if (yf) {
395
PyFrameState state = gen->gi_frame_state;
396
gen->gi_frame_state = FRAME_EXECUTING;
0 commit comments