Mercurial > cpython-lru_cache-weakref
diff Python/compile.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 | fe88e01ff6de |
| children | a812d0fae74a |
line wrap: on
line diff
--- a/Python/compile.c Thu Apr 13 12:09:08 2006 +0000 +++ b/Python/compile.c Thu Apr 13 12:29:43 2006 +0000 @@ -3058,17 +3058,11 @@ 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 @@ } 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)
