Skip to content

Commit

Permalink
and in genobject.c
Browse files Browse the repository at this point in the history
  • Loading branch information
iritkatriel committed Oct 26, 2023
1 parent 754fd74 commit 0e7a692
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Objects/genobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "pycore_modsupport.h" // _PyArg_CheckPositional()
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
#include "pycore_opcode_metadata.h" // _PyOpcode_Caches
#include "pycore_opcode_utils.h" // RESUME_AFTER_YIELD_FROM
#include "pycore_pyerrors.h" // _PyErr_ClearExcState()
#include "pycore_pystate.h" // _PyThreadState_GET()

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

0 comments on commit 0e7a692

Please sign in to comment.