Commit 0d85be19 authored by Guido van Rossum's avatar Guido van Rossum

*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?)
parent 36b9f790
...@@ -1710,18 +1710,6 @@ eval_code2(co, globals, locals, ...@@ -1710,18 +1710,6 @@ eval_code2(co, globals, locals,
fail: /* Jump here from prelude on failure */ 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 */ /* Restore previous frame and release the current one */
current_frame = f->f_back; current_frame = f->f_back;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment