diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-03-18 17:48:58 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-03-18 17:48:58 (GMT) |
commit | cda75be02a79686a8e634576600814271536bc1a (patch) | |
tree | b456968bae7bcdebceb833e7b13dae163d732d36 /Include | |
parent | c45e041bff4a5f9aa137dcd4933c72a9221cd7d5 (diff) | |
download | cpython-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 'Include')
-rw-r--r-- | Include/Python-ast.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Include/Python-ast.h b/Include/Python-ast.h index 9d88d5d..49edcdc 100644 --- a/Include/Python-ast.h +++ b/Include/Python-ast.h @@ -364,18 +364,18 @@ struct _excepthandler { struct _arguments { asdl_seq *args; - identifier vararg; - expr_ty varargannotation; + arg_ty vararg; asdl_seq *kwonlyargs; - identifier kwarg; - expr_ty kwargannotation; - asdl_seq *defaults; asdl_seq *kw_defaults; + arg_ty kwarg; + asdl_seq *defaults; }; struct _arg { identifier arg; expr_ty annotation; + int lineno; + int col_offset; }; struct _keyword { @@ -550,11 +550,10 @@ comprehension_ty _Py_comprehension(expr_ty target, expr_ty iter, asdl_seq * excepthandler_ty _Py_ExceptHandler(expr_ty type, identifier name, asdl_seq * body, int lineno, int col_offset, PyArena *arena); -#define arguments(a0, a1, a2, a3, a4, a5, a6, a7, a8) _Py_arguments(a0, a1, a2, a3, a4, a5, a6, a7, a8) -arguments_ty _Py_arguments(asdl_seq * args, identifier vararg, expr_ty - varargannotation, asdl_seq * kwonlyargs, identifier - kwarg, expr_ty kwargannotation, asdl_seq * defaults, - asdl_seq * kw_defaults, PyArena *arena); +#define arguments(a0, a1, a2, a3, a4, a5, a6) _Py_arguments(a0, a1, a2, a3, a4, a5, a6) +arguments_ty _Py_arguments(asdl_seq * args, arg_ty vararg, asdl_seq * + kwonlyargs, asdl_seq * kw_defaults, arg_ty kwarg, + asdl_seq * defaults, PyArena *arena); #define arg(a0, a1, a2) _Py_arg(a0, a1, a2) arg_ty _Py_arg(identifier arg, expr_ty annotation, PyArena *arena); #define keyword(a0, a1, a2) _Py_keyword(a0, a1, a2) |