Thanks to visit codestin.com Credit goes to github.com
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 1161ab9 commit 6763bfcCopy full SHA for 6763bfc
1 file changed
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