Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 28887:e4eabe5b3da1 legacy-trunk
Use Tim's suggestion to fix
[ 708901 ] Lineno calculation sometimes broken
A one line patch to compile.c and a rather-more-than-one-line patch
to test_dis. Hey ho.
Possibly a backport candidate -- tho' lnotab is less used in 2.2...
| author | Michael W. Hudson <mwh@python.net> |
|---|---|
| date | Tue, 29 Apr 2003 17:07:36 +0000 |
| parents | 3df0cf16defc |
| children | 1763d9d3fd9d |
line wrap: on
line diff
--- a/Python/compile.c Tue Apr 29 16:18:47 2003 +0000 +++ b/Python/compile.c Tue Apr 29 17:07:36 2003 +0000 @@ -3366,7 +3366,7 @@ com_node(c, CHILD(n, 3)); com_addbyte(c, GET_ITER); c->c_begin = c->c_nexti; - com_set_lineno(c, n->n_lineno); + com_set_lineno(c, c->c_last_line); com_addfwref(c, FOR_ITER, &anchor); com_push(c, 1); com_assign(c, CHILD(n, 1), OP_ASSIGN, NULL);
