mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-120834: fix type of *_iframe field in _PyGenObject_HEAD declaration (#120835)
This commit is contained in:
parent
c38e2f64d0
commit
65a12c559c
12 changed files with 81 additions and 79 deletions
|
@ -1338,7 +1338,7 @@ static bool frame_is_suspended(PyFrameObject *frame)
|
|||
{
|
||||
assert(!_PyFrame_IsIncomplete(frame->f_frame));
|
||||
if (frame->f_frame->owner == FRAME_OWNED_BY_GENERATOR) {
|
||||
PyGenObject *gen = _PyFrame_GetGenerator(frame->f_frame);
|
||||
PyGenObject *gen = _PyGen_GetGeneratorFromFrame(frame->f_frame);
|
||||
return FRAME_STATE_SUSPENDED(gen->gi_frame_state);
|
||||
}
|
||||
return false;
|
||||
|
@ -1665,7 +1665,7 @@ static PyObject *
|
|||
frame_clear(PyFrameObject *f, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
if (f->f_frame->owner == FRAME_OWNED_BY_GENERATOR) {
|
||||
PyGenObject *gen = _PyFrame_GetGenerator(f->f_frame);
|
||||
PyGenObject *gen = _PyGen_GetGeneratorFromFrame(f->f_frame);
|
||||
if (gen->gi_frame_state == FRAME_EXECUTING) {
|
||||
goto running;
|
||||
}
|
||||
|
@ -2097,7 +2097,7 @@ PyFrame_GetGenerator(PyFrameObject *frame)
|
|||
if (frame->f_frame->owner != FRAME_OWNED_BY_GENERATOR) {
|
||||
return NULL;
|
||||
}
|
||||
PyGenObject *gen = _PyFrame_GetGenerator(frame->f_frame);
|
||||
PyGenObject *gen = _PyGen_GetGeneratorFromFrame(frame->f_frame);
|
||||
return Py_NewRef(gen);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue