Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e7a692

Browse files
committed
and in genobject.c
1 parent 754fd74 commit 0e7a692

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Objects/genobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "pycore_modsupport.h" // _PyArg_CheckPositional()
1111
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
1212
#include "pycore_opcode_metadata.h" // _PyOpcode_Caches
13+
#include "pycore_opcode_utils.h" // RESUME_AFTER_YIELD_FROM
1314
#include "pycore_pyerrors.h" // _PyErr_ClearExcState()
1415
#include "pycore_pystate.h" // _PyThreadState_GET()
1516

@@ -363,7 +364,7 @@ _PyGen_yf(PyGenObject *gen)
363364
assert(_PyCode_CODE(_PyGen_GetCode(gen))[0].op.code != SEND);
364365
return NULL;
365366
}
366-
if (!is_resume(frame->instr_ptr) || frame->instr_ptr->op.arg < 2)
367+
if (!is_resume(frame->instr_ptr) || frame->instr_ptr->op.arg < RESUME_AFTER_YIELD_FROM)
367368
{
368369
/* Not in a yield from */
369370
return NULL;

0 commit comments

Comments
 (0)