summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2001-09-24 19:32:01 (GMT)
committerThomas Wouters <thomas@python.org>2001-09-24 19:32:01 (GMT)
commit1ee642211112c637e2b125dcc04b24f64984d749 (patch)
treefa91a36d170c981f03932993d5837d837162c436 /Python/ceval.c
parent3d45d8f12ea3b4180ed2e1539aa28e14a150b5ba (diff)
downloadcpython-1ee642211112c637e2b125dcc04b24f64984d749.zip
cpython-1ee642211112c637e2b125dcc04b24f64984d749.tar.gz
cpython-1ee642211112c637e2b125dcc04b24f64984d749.tar.bz2
Don't swap the arguments to PyFrame_BlockSetup when recreating the recently
popped frame-block. What an embarrassing bug! Especially for Jeremy, since he accepted the patch :-) This fixes SF bugs #463359 and #462937, and possibly other, *very* obscure bugs with very deeply nested loops that continue the loop and then break out of it or raise an exception.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 3ca1e3e..5a8f503 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2217,8 +2217,8 @@ eval_frame(PyFrameObject *f)
if (b->b_type == SETUP_LOOP && why == WHY_CONTINUE) {
/* For a continue inside a try block,
don't pop the block for the loop. */
- PyFrame_BlockSetup(f, b->b_type, b->b_level,
- b->b_handler);
+ PyFrame_BlockSetup(f, b->b_type, b->b_handler,
+ b->b_level);
why = WHY_NOT;
JUMPTO(PyInt_AS_LONG(retval));
Py_DECREF(retval);