[Python-checkins] CVS: python/dist/src/Python compile.c,2.170,2.171
Tim Peters
tim_one@users.sourceforge.net
Fri, 23 Feb 2001 14:23:55 -0800
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv2208/python/dist/src/Python
Modified Files:
compile.c
Log Message:
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.
Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.170
retrieving revision 2.171
diff -C2 -r2.170 -r2.171
*** compile.c 2001/02/23 18:22:59 2.170
--- compile.c 2001/02/23 22:23:53 2.171
***************
*** 2155,2167 ****
}
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);
! }
com_addoparg(c, LOAD_CONST, i);
com_push(c, 1);
--- 2155,2161 ----
}
symtable_exit_scope(c->c_symtable);
! 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);