diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-04-13 12:29:43 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-04-13 12:29:43 +0000 |
commit | 0cc56e5c59bbc9d839d1468f8b51ea9391e8852a (patch) | |
tree | b01b94983a324fdc0e660fdd194a9f67060a6e6a /Python/compile.c | |
parent | 0f1955daeea82b6d8765d2b7642a9f082faddc74 (diff) | |
download | cpython-git-0cc56e5c59bbc9d839d1468f8b51ea9391e8852a.tar.gz |
Introduce asdl_int_seq, to hold cmpop_ty.
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/Python/compile.c b/Python/compile.c index 1bbe73a079..8b6f2f1c08 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -3058,17 +3058,11 @@ compiler_compare(struct compiler *c, expr_ty e) VISIT(c, expr, (expr_ty)asdl_seq_GET(e->v.Compare.comparators, 0)); } -#ifdef __cplusplus -#define CMPCAST (intptr_t) -#else -#define CMPCAST -#endif for (i = 1; i < n; i++) { ADDOP(c, DUP_TOP); ADDOP(c, ROT_THREE); - /* XXX We're casting a void* to cmpop_ty in the next stmt. */ ADDOP_I(c, COMPARE_OP, - cmpop((cmpop_ty)( CMPCAST asdl_seq_GET( + cmpop((cmpop_ty)(asdl_seq_GET( e->v.Compare.ops, i - 1)))); ADDOP_JREL(c, JUMP_IF_FALSE, cleanup); NEXT_BLOCK(c); @@ -3079,9 +3073,7 @@ compiler_compare(struct compiler *c, expr_ty e) } VISIT(c, expr, (expr_ty)asdl_seq_GET(e->v.Compare.comparators, n - 1)); ADDOP_I(c, COMPARE_OP, - /* XXX We're casting a void* to cmpop_ty in the next stmt. */ - cmpop((cmpop_ty)( CMPCAST asdl_seq_GET(e->v.Compare.ops, - n - 1)))); + cmpop((cmpop_ty)(asdl_seq_GET(e->v.Compare.ops, n - 1)))); if (n > 1) { basicblock *end = compiler_new_block(c); if (end == NULL) |