summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-10-26 14:30:30 (GMT)
committerGitHub <noreply@github.com>2019-10-26 14:30:30 (GMT)
commit493fef60a7600f83fe6916ed89d0fb0c0aab484d (patch)
tree3c58ac5f7d86a672d7701cb0aca86c1f308ce54c /Python
parentc80955cdee60c2688819a99a4c54252d77998263 (diff)
downloadcpython-493fef60a7600f83fe6916ed89d0fb0c0aab484d.zip
cpython-493fef60a7600f83fe6916ed89d0fb0c0aab484d.tar.gz
cpython-493fef60a7600f83fe6916ed89d0fb0c0aab484d.tar.bz2
[2.7] bpo-38535: Fix positions for AST nodes for calls without arguments in decorators. (GH-16861). (GH-16931)
(cherry picked from commit 26ae9f6d3d755734c9f371b9356325afe5764813)
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 9460325..10571a3 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -852,8 +852,9 @@ ast_for_decorator(struct compiling *c, const node *n)
name_expr = NULL;
}
else if (NCH(n) == 5) { /* Call with no arguments */
- d = Call(name_expr, NULL, NULL, NULL, NULL, LINENO(n),
- n->n_col_offset, c->c_arena);
+ d = Call(name_expr, NULL, NULL, NULL, NULL,
+ name_expr->lineno, name_expr->col_offset,
+ c->c_arena);
if (!d)
return NULL;
name_expr = NULL;