summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-02-14 16:32:14 (GMT)
committerGuido van Rossum <guido@python.org>1997-02-14 16:32:14 (GMT)
commit0d85be19e29788d6221295e8910f5d9a671eac85 (patch)
treea92d27add36abcf040645d8addce50cda5bb739b /Python
parent36b9f7908a168957d151595817b2c06a2fcb9a40 (diff)
downloadcpython-0d85be19e29788d6221295e8910f5d9a671eac85.zip
cpython-0d85be19e29788d6221295e8910f5d9a671eac85.tar.gz
cpython-0d85be19e29788d6221295e8910f5d9a671eac85.tar.bz2
*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?)
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 65aad61..37a4168 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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 */