Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca90605

Browse files
committed
Add more SET_LINENO instructions in long argument lists
1 parent f5046d1 commit ca90605

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Python/compile.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,11 +1168,17 @@ com_call_function(c, n)
11681168
else {
11691169
PyObject *keywords = NULL;
11701170
int i, na, nk;
1171+
int lineno = n->n_lineno;
11711172
REQ(n, arglist);
11721173
na = 0;
11731174
nk = 0;
11741175
for (i = 0; i < NCH(n); i += 2) {
1175-
com_argument(c, CHILD(n, i), &keywords);
1176+
node *ch = CHILD(n, i);
1177+
if (ch->n_lineno != lineno) {
1178+
lineno = ch->n_lineno;
1179+
com_addoparg(c, SET_LINENO, lineno);
1180+
}
1181+
com_argument(c, ch, &keywords);
11761182
if (keywords == NULL)
11771183
na++;
11781184
else

0 commit comments

Comments
 (0)