mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
*Don't* kill all local variables on function exit. This will be done
by the frameobject dealloc when it is time for the locals to go. When there's still a traceback object referencing this stack frame, we don't want the local variables to disappear yet. (Hmm... Shouldn't they be copied to the f_locals dictionary?)
This commit is contained in:
parent
36b9f7908a
commit
0d85be19e2
1 changed files with 0 additions and 12 deletions
|
@ -1709,18 +1709,6 @@ eval_code2(co, globals, locals,
|
|||
--recursion_depth;
|
||||
|
||||
fail: /* Jump here from prelude on failure */
|
||||
|
||||
/* Kill all local variables */
|
||||
|
||||
{
|
||||
int i;
|
||||
for (i = co->co_nlocals; --i >= 0; ++fastlocals) {
|
||||
if (*fastlocals != NULL) {
|
||||
DECREF(*fastlocals);
|
||||
*fastlocals = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Restore previous frame and release the current one */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue