[Python-checkins] CVS: python/dist/src/Python ceval.c,2.276,2.277

Thomas Wouters twouters@users.sourceforge.net
2001年9月24日 12:32:03 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv1098/Python
Modified Files:
	ceval.c 
Log Message:
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.
Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.276
retrieving revision 2.277
diff -C2 -d -r2.276 -r2.277
*** ceval.c	2001年09月20日 20:46:19	2.276
--- ceval.c	2001年09月24日 19:32:01	2.277
***************
*** 2218,2223 ****
 				/* 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);
 				why = WHY_NOT;
 				JUMPTO(PyInt_AS_LONG(retval));
--- 2218,2223 ----
 				/* For a continue inside a try block,
 				 don't pop the block for the loop. */
! 				PyFrame_BlockSetup(f, b->b_type, b->b_handler,
! 						 b->b_level);
 				why = WHY_NOT;
 				JUMPTO(PyInt_AS_LONG(retval));

AltStyle によって変換されたページ (->オリジナル) /