Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 5099:b4231d592281 legacy-trunk
*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?)
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 14 Feb 1997 16:32:14 +0000 |
| parents | 7841c48cdb5b |
| children | b18e03ba4817 |
line wrap: on
line diff
--- a/Python/ceval.c Fri Feb 14 16:29:22 1997 +0000 +++ b/Python/ceval.c Fri Feb 14 16:32:14 1997 +0000 @@ -1709,18 +1709,6 @@ --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 */
