diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2008-03-31 05:14:30 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2008-03-31 05:14:30 (GMT) |
commit | ad74aa8dc015fab019ffa965f45cc3437ad152c2 (patch) | |
tree | 2e4c8aad0da2d1d65be842895efc52af6d8adc64 /Include/Python-ast.h | |
parent | d35759388b224106c4331812d5931d8ce5ae8c07 (diff) | |
download | cpython-ad74aa8dc015fab019ffa965f45cc3437ad152c2.zip cpython-ad74aa8dc015fab019ffa965f45cc3437ad152c2.tar.gz cpython-ad74aa8dc015fab019ffa965f45cc3437ad152c2.tar.bz2 |
Merged revisions 62047 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r62047 | georg.brandl | 2008-03-29 23:40:17 -0700 (Sat, 29 Mar 2008) | 2 lines
Patch #2511: Give the "excepthandler" AST item proper attributes by making it a Sum.
........
Diffstat (limited to 'Include/Python-ast.h')
-rw-r--r-- | Include/Python-ast.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Include/Python-ast.h b/Include/Python-ast.h index 6653b08..0ad788b 100644 --- a/Include/Python-ast.h +++ b/Include/Python-ast.h @@ -342,10 +342,17 @@ struct _comprehension { asdl_seq *ifs; }; +enum _excepthandler_kind {ExceptHandler_kind=1}; struct _excepthandler { - expr_ty type; - identifier name; - asdl_seq *body; + enum _excepthandler_kind kind; + union { + struct { + expr_ty type; + identifier name; + asdl_seq *body; + } ExceptHandler; + + } v; int lineno; int col_offset; }; @@ -525,8 +532,8 @@ slice_ty _Py_Index(expr_ty value, PyArena *arena); #define comprehension(a0, a1, a2, a3) _Py_comprehension(a0, a1, a2, a3) comprehension_ty _Py_comprehension(expr_ty target, expr_ty iter, asdl_seq * ifs, PyArena *arena); -#define excepthandler(a0, a1, a2, a3, a4, a5) _Py_excepthandler(a0, a1, a2, a3, a4, a5) -excepthandler_ty _Py_excepthandler(expr_ty type, identifier name, asdl_seq * +#define ExceptHandler(a0, a1, a2, a3, a4, a5) _Py_ExceptHandler(a0, a1, a2, a3, a4, a5) +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) |