diff Python/ast.c @ 37685:5e72b0c74100 legacy-trunk

Introduce asdl_int_seq, to hold cmpop_ty.
author Martin v. Löwis <martin@v.loewis.de>
date Thu, 13 Apr 2006 12:29:43 +0000
parents c732f66c913f
children ce5585afc20f
line wrap: on
line diff
--- a/Python/ast.c	Thu Apr 13 12:09:08 2006 +0000
+++ b/Python/ast.c	Thu Apr 13 12:29:43 2006 +0000
@@ -1600,8 +1600,9 @@
             }
             else {
                 expr_ty expression;
-                asdl_seq *ops, *cmps;
-                ops = asdl_seq_new(NCH(n) / 2, c->c_arena);
+                asdl_int_seq *ops;
+		asdl_seq *cmps;
+                ops = asdl_int_seq_new(NCH(n) / 2, c->c_arena);
                 if (!ops)
                     return NULL;
                 cmps = asdl_seq_new(NCH(n) / 2, c->c_arena);
@@ -1609,7 +1610,6 @@
                     return NULL;
                 }
                 for (i = 1; i < NCH(n); i += 2) {
-                    /* XXX cmpop_ty is just an enum */
                     cmpop_ty newoperator;
 
                     newoperator = ast_for_comp_op(CHILD(n, i));
@@ -1622,7 +1622,7 @@
                         return NULL;
 		    }
                         
-                    asdl_seq_SET(ops, i / 2, (void *)(Py_uintptr_t)newoperator);
+                    asdl_seq_SET(ops, i / 2, newoperator);
                     asdl_seq_SET(cmps, i / 2, expression);
                 }
                 expression = ast_for_expr(c, CHILD(n, 0));