summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-12-10 16:56:22 (GMT)
committerGuido van Rossum <guido@python.org>1998-12-10 16:56:22 (GMT)
commitca90605678cb724b9fc521e42abd644162d686c3 (patch)
treedf2909da6092ed8087d3260cfce69bcc1554c63e /Python
parentf5046d1aeae66715717cda25b98ae86f2fcda590 (diff)
downloadcpython-ca90605678cb724b9fc521e42abd644162d686c3.zip
cpython-ca90605678cb724b9fc521e42abd644162d686c3.tar.gz
cpython-ca90605678cb724b9fc521e42abd644162d686c3.tar.bz2
Add more SET_LINENO instructions in long argument lists
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 19f18e6..3903524 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1168,11 +1168,17 @@ com_call_function(c, n)
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