8000 GH-94262: Don't create frame objects for frames that aren't complete. by markshannon · Pull Request #94371 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-94262: Don't create frame objects for frames that aren't complete. #94371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 1, 2022
Prev Previous commit
Next Next commit
Explain _PyFrame_IsIncomplete()
  • Loading branch information
markshannon committed Jun 28, 2022
commit 6d071657e154f627126b30b64696cd0692c15467
5 changes: 4 additions & 1 deletion Include/internal/pycore_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ PyGenObject *_PyFrame_GetGenerator(_PyInterpreterFrame *frame)
return (PyGenObject *)(((char *)frame) - offset_in_gen);
}


/* Determine whether a frame is incomplete.
* A frame is incomplete until the first RESUME instruction
* as it may be part way through creating cell objects or a
* generator or coroutine. */
static inline bool
_PyFrame_IsIncomplete(_PyInterpreterFrame *frame)
{
Expand Down
0