summaryrefslogtreecommitdiffstats
path: root/Python/symtable.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-03-18 17:48:58 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-03-18 17:48:58 (GMT)
commitcda75be02a79686a8e634576600814271536bc1a (patch)
treeb456968bae7bcdebceb833e7b13dae163d732d36 /Python/symtable.c
parentc45e041bff4a5f9aa137dcd4933c72a9221cd7d5 (diff)
downloadcpython-cda75be02a79686a8e634576600814271536bc1a.zip
cpython-cda75be02a79686a8e634576600814271536bc1a.tar.gz
cpython-cda75be02a79686a8e634576600814271536bc1a.tar.bz2
unify some ast.argument's attrs; change Attribute column offset (closes #16795)
Patch from Sven Brauch.
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index d16bfbc..b9ca615 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -1530,10 +1530,10 @@ symtable_visit_annotations(struct symtable *st, stmt_ty s)
if (a->args && !symtable_visit_argannotations(st, a->args))
return 0;
- if (a->varargannotation)
- VISIT(st, expr, a->varargannotation);
- if (a->kwargannotation)
- VISIT(st, expr, a->kwargannotation);
+ if (a->vararg && a->vararg->annotation)
+ VISIT(st, expr, a->vararg->annotation);
+ if (a->kwarg && a->kwarg->annotation)
+ VISIT(st, expr, a->kwarg->annotation);
if (a->kwonlyargs && !symtable_visit_argannotations(st, a->kwonlyargs))
return 0;
if (s->v.FunctionDef.returns)
@@ -1552,12 +1552,12 @@ symtable_visit_arguments(struct symtable *st, arguments_ty a)
if (a->kwonlyargs && !symtable_visit_params(st, a->kwonlyargs))
return 0;
if (a->vararg) {
- if (!symtable_add_def(st, a->vararg, DEF_PARAM))
+ if (!symtable_add_def(st, a->vararg->arg, DEF_PARAM))
return 0;
st->st_cur->ste_varargs = 1;
}
if (a->kwarg) {
- if (!symtable_add_def(st, a->kwarg, DEF_PARAM))
+ if (!symtable_add_def(st, a->kwarg->arg, DEF_PARAM))
return 0;
st->st_cur->ste_varkeywords = 1;
}