diff options
author | shadchin <shadchin@yandex-team.com> | 2024-08-17 21:51:59 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.com> | 2024-08-17 22:04:51 +0300 |
commit | ee9edbd8878888bafcd0eeb3b528f3ec4311560b (patch) | |
tree | d54d8138e50a446904f10a2092719be86af011b7 /contrib/tools/python3/Python/frame.c | |
parent | 72cbe4bad58add0912623ba51351ff1db8587249 (diff) | |
download | ydb-ee9edbd8878888bafcd0eeb3b528f3ec4311560b.tar.gz |
Update Python 3 to 3.12.5
https://docs.python.org/release/3.12.5/whatsnew/changelog.html#python-3-12-5-final
de86cdeacd3a8653b9ec36e87975886fafcf6dc2
Diffstat (limited to 'contrib/tools/python3/Python/frame.c')
-rw-r--r-- | contrib/tools/python3/Python/frame.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/contrib/tools/python3/Python/frame.c b/contrib/tools/python3/Python/frame.c index a49215fa44..b84fd9b6a9 100644 --- a/contrib/tools/python3/Python/frame.c +++ b/contrib/tools/python3/Python/frame.c @@ -116,18 +116,6 @@ take_ownership(PyFrameObject *f, _PyInterpreterFrame *frame) } void -_PyFrame_ClearLocals(_PyInterpreterFrame *frame) -{ - assert(frame->stacktop >= 0); - int stacktop = frame->stacktop; - frame->stacktop = 0; - for (int i = 0; i < stacktop; i++) { - Py_XDECREF(frame->localsplus[i]); - } - Py_CLEAR(frame->f_locals); -} - -void _PyFrame_ClearExceptCode(_PyInterpreterFrame *frame) { /* It is the responsibility of the owning generator/coroutine @@ -147,8 +135,12 @@ _PyFrame_ClearExceptCode(_PyInterpreterFrame *frame) } Py_DECREF(f); } - _PyFrame_ClearLocals(frame); + assert(frame->stacktop >= 0); + for (int i = 0; i < frame->stacktop; i++) { + Py_XDECREF(frame->localsplus[i]); + } Py_XDECREF(frame->frame_obj); + Py_XDECREF(frame->f_locals); Py_DECREF(frame->f_funcobj); } |