diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2024-04-30 18:32:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-30 18:32:25 (GMT) |
commit | 1f16b4ce569f222af74fcbb7b2ef98eee2398d20 (patch) | |
tree | 7622e1756c99f6028b41585131a317948762f221 /Include | |
parent | f7747f73a9d9b9b1661c1a69cd8d934d56bbd3b3 (diff) | |
download | cpython-1f16b4ce569f222af74fcbb7b2ef98eee2398d20.zip cpython-1f16b4ce569f222af74fcbb7b2ef98eee2398d20.tar.gz cpython-1f16b4ce569f222af74fcbb7b2ef98eee2398d20.tar.bz2 |
gh-118272: Clear generator frame's locals when the generator is closed (#118277)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_frame.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/internal/pycore_frame.h b/Include/internal/pycore_frame.h index f913928..37ae5ae 100644 --- a/Include/internal/pycore_frame.h +++ b/Include/internal/pycore_frame.h @@ -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 |