mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-118272: Clear generator frame's locals when the generator is closed (#118277)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
This commit is contained in:
parent
f7747f73a9
commit
1f16b4ce56
5 changed files with 38 additions and 5 deletions
|
|
@ -227,6 +227,9 @@ _PyFrame_GetFrameObject(_PyInterpreterFrame *frame)
|
|||
return _PyFrame_MakeAndSetFrameObject(frame);
|
||||
}
|
||||
|
||||
void
|
||||
_PyFrame_ClearLocals(_PyInterpreterFrame *frame);
|
||||
|
||||
/* Clears all references in the frame.
|
||||
* If take is non-zero, then the _PyInterpreterFrame frame
|
||||
* may be transferred to the frame object it references
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue