diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-21 00:09:09 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-21 00:09:09 +0000 |
commit | 126f6791b82fb638b5935456bf6e97f0f6ff7979 (patch) | |
tree | d890c0349c764261d493a69d726793542a4bb392 /cop.h | |
parent | 761023feec75742fcbc62fba2fafed34a19b3ad8 (diff) | |
download | perl-126f6791b82fb638b5935456bf6e97f0f6ff7979.tar.gz |
under useithreads, PUSHLOOP must save PL_curpad for looking up
iterdata, since dounwind() may defer LEAVEs
p4raw-id: //depot/perl@5847
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |