summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2005-12-18 07:06:23 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2005-12-18 07:06:23 (GMT)
commit51abbc7b4affeeedb8faf1adee8195be9ad8195f (patch)
treec4bc413f79bfff8a43e91a0f2bd15322da92cce9 /Python
parent0e7a0ed335b464eb82e2b06f334566fe6d35226a (diff)
downloadcpython-51abbc7b4affeeedb8faf1adee8195be9ad8195f.zip
cpython-51abbc7b4affeeedb8faf1adee8195be9ad8195f.tar.gz
cpython-51abbc7b4affeeedb8faf1adee8195be9ad8195f.tar.bz2
Fix Armin's bug 1333982. He found it, he didn't created it :-)
This code generated a C assertion: assert 1, ([s for s in x] + [s for s in x]) pass assert was completely broken, it needed to use the proper block. compiler_use_block() is now no longer used, so remove it.
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 606a446..60b4933 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -171,7 +171,6 @@ static int compiler_addop(struct compiler *, int);
static int compiler_addop_o(struct compiler *, int, PyObject *, PyObject *);
static int compiler_addop_i(struct compiler *, int, int);
static int compiler_addop_j(struct compiler *, int, basicblock *, int);
-static void compiler_use_block(struct compiler *, basicblock *);
static basicblock *compiler_use_new_block(struct compiler *);
static int compiler_error(struct compiler *, const char *);
static int compiler_nameop(struct compiler *, identifier, expr_context_ty);
@@ -1178,13 +1177,6 @@ compiler_new_block(struct compiler *c)
return b;
}
-static void
-compiler_use_block(struct compiler *c, basicblock *block)
-{
- assert (block != NULL);
- c->u->u_curblock = block;
-}
-
static basicblock *
compiler_use_new_block(struct compiler *c)
{
@@ -2529,7 +2521,7 @@ compiler_assert(struct compiler *c, stmt_ty s)
else {
ADDOP_I(c, RAISE_VARARGS, 1);
}
- compiler_use_block(c, end);
+ compiler_use_next_block(c, end);
ADDOP(c, POP_TOP);
return 1;
}