8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e89ada8 commit 008b4bdCopy full SHA for 008b4bd
Python/frame.c
@@ -98,10 +98,11 @@ void
98
_PyFrame_ClearLocals(_PyInterpreterFrame *frame)
99
{
100
assert(frame->stacktop >= 0);
101
- for (int i = 0; i < frame->stacktop; i++) {
+ int stacktop = frame->stacktop;
102
+ frame->stacktop = 0;
103
+ for (int i = 0; i < stacktop; i++) {
104
Py_XDECREF(frame->localsplus[i]);
105
}
- frame->stacktop = 0;
106
Py_CLEAR(frame->f_locals);
107
108
0 commit comments