summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-04-13 12:29:43 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-04-13 12:29:43 (GMT)
commit0cc56e5c59bbc9d839d1468f8b51ea9391e8852a (patch)
treeb01b94983a324fdc0e660fdd194a9f67060a6e6a /Python/ast.c
parent0f1955daeea82b6d8765d2b7642a9f082faddc74 (diff)
downloadcpython-0cc56e5c59bbc9d839d1468f8b51ea9391e8852a.zip
cpython-0cc56e5c59bbc9d839d1468f8b51ea9391e8852a.tar.gz
cpython-0cc56e5c59bbc9d839d1468f8b51ea9391e8852a.tar.bz2
Introduce asdl_int_seq, to hold cmpop_ty.
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/ast.c b/Python/ast.c
index e825042..0b3b485 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -1600,8 +1600,9 @@ ast_for_expr(struct compiling *c, const node *n)
}
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 @@ ast_for_expr(struct compiling *c, const node *n)
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 @@ ast_for_expr(struct compiling *c, const node *n)
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));