Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 9625:1fe48009d8ea legacy-trunk
Add more SET_LINENO instructions in long argument lists
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 10 Dec 1998 16:56:22 +0000 |
| parents | 0a67db47e1d0 |
| children | 98a6fc6877ae |
line wrap: on
line diff
--- a/Python/compile.c Thu Dec 10 16:54:48 1998 +0000 +++ b/Python/compile.c Thu Dec 10 16:56:22 1998 +0000 @@ -1168,11 +1168,17 @@ else { PyObject *keywords = NULL; int i, na, nk; + int lineno = n->n_lineno; REQ(n, arglist); na = 0; nk = 0; for (i = 0; i < NCH(n); i += 2) { - com_argument(c, CHILD(n, i), &keywords); + node *ch = CHILD(n, i); + if (ch->n_lineno != lineno) { + lineno = ch->n_lineno; + com_addoparg(c, SET_LINENO, lineno); + } + com_argument(c, ch, &keywords); if (keywords == NULL) na++; else
