[Python-checkins] python/dist/src/Python ceval.c,2.361,2.362

mwh@users.sourceforge.net mwh@users.sourceforge.net
Tue, 29 Apr 2003 09:19:20 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv24164/Python

Modified Files:
	ceval.c 
Log Message:
Armin Rigo's fix & test for

[ 729622 ] line tracing hook errors

with massaging from me to integrate test into test suite.


Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.361
retrieving revision 2.362
diff -C2 -d -r2.361 -r2.362
*** ceval.c	24 Apr 2003 05:45:22 -0000	2.361
--- ceval.c	29 Apr 2003 16:18:42 -0000	2.362
***************
*** 820,835 ****
  			f->f_stacktop = stack_pointer;
  			
! 			if (maybe_call_line_trace(tstate->c_tracefunc,
! 						  tstate->c_traceobj,
! 						  f, &instr_lb, &instr_ub)) {
  				/* trace function raised an exception */
- 				why = WHY_EXCEPTION;
  				goto on_error;
  			}
- 			/* Reload possibly changed frame fields */
- 			JUMPTO(f->f_lasti);
- 			stack_pointer = f->f_stacktop;
- 			assert(stack_pointer != NULL);
- 			f->f_stacktop = NULL;
  		}
  
--- 820,836 ----
  			f->f_stacktop = stack_pointer;
  			
! 			err = maybe_call_line_trace(tstate->c_tracefunc,
! 						    tstate->c_traceobj,
! 						    f, &instr_lb, &instr_ub);
! 			/* Reload possibly changed frame fields */
! 			JUMPTO(f->f_lasti);
! 			if (f->f_stacktop != NULL) {
! 				stack_pointer = f->f_stacktop;
! 				f->f_stacktop = NULL;
! 			}
! 			if (err) {
  				/* trace function raised an exception */
  				goto on_error;
  			}
  		}