File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 10
10
#include "pycore_modsupport.h" // _PyArg_CheckPositional()
11
11
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
12
12
#include "pycore_opcode_metadata.h" // _PyOpcode_Caches
13
+ #include "pycore_opcode_utils.h" // RESUME_AFTER_YIELD_FROM
13
14
#include "pycore_pyerrors.h" // _PyErr_ClearExcState()
14
15
#include "pycore_pystate.h" // _PyThreadState_GET()
15
16
@@ -363,7 +364,7 @@ _PyGen_yf(PyGenObject *gen)
363
364
assert (_PyCode_CODE (_PyGen_GetCode (gen ))[0 ].op .code != SEND );
364
365
return NULL ;
365
366
}
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 )
367
368
{
368
369
/* Not in a yield from */
369
370
return NULL ;
You can’t perform that action at this time.
0 commit comments