diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-07-17 13:35:51 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-07-17 13:35:51 +0000 |
commit | 6d4ff0d2f86d3c242b3f29bee3c2734df9ab8a3a (patch) | |
tree | 214aad99b5b3c414ccc9a349a7aacbdda3b96649 /cop.h | |
parent | c03294656c9980c235cc5951a63088fd96d33704 (diff) | |
download | perl-6d4ff0d2f86d3c242b3f29bee3c2734df9ab8a3a.tar.gz |
Fix multiple problems with lexical @_.
p4raw-id: //depot/perl@39
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -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); \ |