mirror of
https://github.com/python/cpython.git
synced 2025-07-10 04:45:36 +00:00
GH-118095: Handle RETURN_GENERATOR
in tier 2 (GH-118180)
This commit is contained in:
parent
10bb90ed49
commit
f180b31e76
16 changed files with 143 additions and 81 deletions
|
@ -53,18 +53,6 @@ _PyFrame_MakeAndSetFrameObject(_PyInterpreterFrame *frame)
|
|||
return f;
|
||||
}
|
||||
|
||||
void
|
||||
_PyFrame_Copy(_PyInterpreterFrame *src, _PyInterpreterFrame *dest)
|
||||
{
|
||||
assert(src->stacktop >= _PyFrame_GetCode(src)->co_nlocalsplus);
|
||||
Py_ssize_t size = ((char*)&src->localsplus[src->stacktop]) - (char *)src;
|
||||
memcpy(dest, src, size);
|
||||
// Don't leave a dangling pointer to the old frame when creating generators
|
||||
// and coroutines:
|
||||
dest->previous = NULL;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
take_ownership(PyFrameObject *f, _PyInterpreterFrame *frame)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue