X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=cop.h;h=f49bfaf77ac46f98c6e37d062ea973b7498bdf7f;hb=1d603a678689f1e74cf73914a432b2a8d38be470;hp=baedc5a52d13d3fee0a0b9dc3b39aa5828ff0341;hpb=c90c0ff485be15aaf3ee20121299cb014ee6b1ff;p=p5sagit%2Fp5-mst-13.2.git diff --git a/cop.h b/cop.h index baedc5a..f49bfaf 100644 --- a/cop.h +++ b/cop.h @@ -28,7 +28,9 @@ struct block_sub { CV * cv; GV * gv; GV * dfoutgv; +#ifndef USE_THREADS AV * savearray; +#endif /* USE_THREADS */ AV * argarray; U16 olddepth; U8 hasargs; @@ -54,11 +56,19 @@ struct block_sub { #define POPSUB1(cx) \ cxsub = cx->blk_sub; /* because DESTROY may clobber *cx */ +#ifdef USE_THREADS +#define POPSAVEARRAY() NOOP +#else +#define POPSAVEARRAY() \ + STMT_START { \ + SvREFCNT_dec(GvAV(defgv)); \ + GvAV(defgv) = cxsub.savearray; \ + } STMT_END +#endif /* USE_THREADS */ + #define POPSUB2() \ if (cxsub.hasargs) { \ - /* put back old @_ */ \ - SvREFCNT_dec(GvAV(defgv)); \ - GvAV(defgv) = cxsub.savearray; \ + POPSAVEARRAY(); \ /* destroy arg array */ \ av_clear(cxsub.argarray); \ AvREAL_off(cxsub.argarray); \