mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix _PyGen_yf()
Issue #28782: Fix a bug in the implementation ``yield from`` when checking if the next instruction is YIELD_FROM. Regression introduced by WORDCODE (issue #26647). Reviewed by Serhiy Storchaka and Yury Selivanov.
This commit is contained in:
parent
b3c5dc912d
commit
f7d199ff32
3 changed files with 14 additions and 0 deletions
|
@ -2043,6 +2043,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
|
|||
f->f_stacktop = stack_pointer;
|
||||
why = WHY_YIELD;
|
||||
/* and repeat... */
|
||||
assert(f->f_lasti >= (int)sizeof(_Py_CODEUNIT));
|
||||
f->f_lasti -= sizeof(_Py_CODEUNIT);
|
||||
goto fast_yield;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue