]> granicus.if.org Git - python/commitdiff
Don't swap the arguments to PyFrame_BlockSetup when recreating the recently
authorThomas Wouters <thomas@python.org>
Mon, 24 Sep 2001 19:32:01 +0000 (19:32 +0000)
committerThomas Wouters <thomas@python.org>
Mon, 24 Sep 2001 19:32:01 +0000 (19:32 +0000)
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.

Python/ceval.c

index 3ca1e3e283444b56801b1f5306641d47d612da06..5a8f503eb789040d24a8a1bc2e7bf78a0f6b285b 100644 (file)
@@ -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);