[Python-checkins] r45272 - in python/trunk: Include/Python-ast.h Parser/asdl_c.py Python/Python-ast.c (original) (raw)

martin.v.loewis python-checkins at python.org
Tue Apr 11 10:06:50 CEST 2006


Author: martin.v.loewis Date: Tue Apr 11 10:06:50 2006 New Revision: 45272

Modified: python/trunk/Include/Python-ast.h python/trunk/Parser/asdl_c.py python/trunk/Python/Python-ast.c Log: Make _kind types global for C++ compilation. Explicitly cast void* to int to cmpop_ty.

Modified: python/trunk/Include/Python-ast.h

--- python/trunk/Include/Python-ast.h (original) +++ python/trunk/Include/Python-ast.h Tue Apr 11 10:06:50 2006 @@ -35,9 +35,10 @@ typedef struct _alias *alias_ty;

+enum _mod_kind {Module_kind=1, Interactive_kind=2, Expression_kind=3,

struct _mod {

@@ -58,14 +59,15 @@ } v; };

+enum _stmt_kind {FunctionDef_kind=1, ClassDef_kind=2, Return_kind=3,

struct _stmt {

@@ -181,12 +183,14 @@ int col_offset; };

+enum _expr_kind {BoolOp_kind=1, BinOp_kind=2, UnaryOp_kind=3, Lambda_kind=4,

struct _expr {

@@ -292,9 +296,9 @@ int col_offset; };

+enum _slice_kind {Ellipsis_kind=1, Slice_kind=2, ExtSlice_kind=3, Index_kind=4}; struct _slice {

Modified: python/trunk/Parser/asdl_c.py

--- python/trunk/Parser/asdl_c.py (original) +++ python/trunk/Parser/asdl_c.py Tue Apr 11 10:06:50 2006 @@ -155,8 +155,10 @@ type = sum.types[i] enum.append("%s_kind=%d" % (type.name, i + 1))

@@ -679,8 +681,8 @@ self.emit("if (!value) goto failed;", depth+1) self.emit("for(i = 0; i < n; i++)", depth+1) # This cannot fail, so no need for error handling

Modified: python/trunk/Python/Python-ast.c

--- python/trunk/Python/Python-ast.c (original) +++ python/trunk/Python/Python-ast.c Tue Apr 11 10:06:50 2006 @@ -2505,7 +2505,7 @@ value = PyList_New(n); if (!value) goto failed; for(i = 0; i < n; i++)



More information about the Python-checkins mailing list