After the removal of SET_LINENO, PyCode_Addr2Line has always been

called to find tb_lineno -- even if Py_OptimizeFlag is true.

So don't call it again when printing the traceback.
This commit is contained in:
Michael W. Hudson 2003-02-22 13:07:53 +00:00
parent d9bb1a0b01
commit c85b6a2d4d
1 changed files with 0 additions and 3 deletions

View File

@ -238,9 +238,6 @@ tb_printinternal(tracebackobject *tb, PyObject *f, int limit)
}
while (tb != NULL && err == 0) {
if (depth <= limit) {
if (Py_OptimizeFlag)
tb->tb_lineno = PyCode_Addr2Line(
tb->tb_frame->f_code, tb->tb_lasti);
err = tb_displayline(f,
PyString_AsString(
tb->tb_frame->f_code->co_filename),