diff Python/symtable.c @ 82732:7c5c678e4164

unify some ast.argument's attrs; change Attribute column offset (closes #16795) Patch from Sven Brauch.
author Benjamin Peterson <benjamin@python.org>
date Mon, 18 Mar 2013 10:48:58 -0700
parents 03f92a9f0875
children 3d858f1eef54
line wrap: on
line diff
--- a/Python/symtable.c	Mon Mar 18 10:10:08 2013 -0700
+++ b/Python/symtable.c	Mon Mar 18 10:48:58 2013 -0700
@@ -1530,10 +1530,10 @@
 
     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 @@
     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;
     }