diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-02-23 22:23:53 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-02-23 22:23:53 (GMT) |
commit | 1e542110f9b05552ba066fc1d8c8b9ae1da699e8 (patch) | |
tree | b1ead99f167e6cbdbd27d35d46144e2336983ac9 /Python | |
parent | 5dd7362295c71427f80d0bf404bf122cdd013b3c (diff) | |
download | cpython-1e542110f9b05552ba066fc1d8c8b9ae1da699e8.zip cpython-1e542110f9b05552ba066fc1d8c8b9ae1da699e8.tar.gz cpython-1e542110f9b05552ba066fc1d8c8b9ae1da699e8.tar.bz2 |
Shuffle premature decref; nuke unreachable code block.
Fixes the "debug-build -O test_builtin.py and no test_b2.pyo" crash just
discussed on Python-Dev.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/compile.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Python/compile.c b/Python/compile.c index 15895f2..d5cad87 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2154,15 +2154,9 @@ com_test(struct compiling *c, node *n) return; } symtable_exit_scope(c->c_symtable); - if (co == NULL) { - c->c_errors++; - i = 255; - closure = 0; - } else { - i = com_addconst(c, co); - Py_DECREF(co); - closure = com_make_closure(c, (PyCodeObject *)co); - } + i = com_addconst(c, co); + closure = com_make_closure(c, (PyCodeObject *)co); + Py_DECREF(co); com_addoparg(c, LOAD_CONST, i); com_push(c, 1); if (closure) |