Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 16763:2f585cbe71da legacy-trunk
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.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Fri, 23 Feb 2001 22:23:53 +0000 |
| parents | 23c7a0108f59 |
| children | 5a1230de436a |
line wrap: on
line diff
--- a/Python/compile.c Fri Feb 23 22:18:27 2001 +0000 +++ b/Python/compile.c Fri Feb 23 22:23:53 2001 +0000 @@ -2154,15 +2154,9 @@ 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)
