From: Gurusamy Sarathy Date: Tue, 21 Mar 2000 00:09:09 +0000 (+0000) Subject: under useithreads, PUSHLOOP must save PL_curpad for looking up X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9e5093700069f9f74b9ca2d59c30b0b9880239d2;p=p5sagit%2Fp5-mst-13.2.git under useithreads, PUSHLOOP must save PL_curpad for looking up iterdata, since dounwind() may defer LEAVEs p4raw-id: //depot/perl@5847 --- diff --git a/cop.h b/cop.h index 5dd937e..e588675 100644 --- a/cop.h +++ b/cop.h @@ -181,6 +181,7 @@ struct block_loop { OP * last_op; #ifdef USE_ITHREADS void * iterdata; + SV ** oldcurpad; #else SV ** itervar; #endif @@ -195,10 +196,11 @@ struct block_loop { # define CxITERVAR(c) \ ((c)->blk_loop.iterdata \ ? (CxPADLOOP(cx) \ - ? &PL_curpad[(PADOFFSET)(c)->blk_loop.iterdata] \ + ? &((c)->blk_loop.oldcurpad)[(PADOFFSET)(c)->blk_loop.iterdata] \ : &GvSV((GV*)(c)->blk_loop.iterdata)) \ : (SV**)NULL) # define CX_ITERDATA_SET(cx,idata) \ + cx->blk_loop.oldcurpad = PL_curpad; \ if ((cx->blk_loop.iterdata = (idata))) \ cx->blk_loop.itersave = SvREFCNT_inc(*CxITERVAR(cx)); #else