diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1997-02-04 17:47:00 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-02-04 17:47:00 +1200 |
commit | f86702ccfcc3646d7aa30b09ce4f4413be9f99d1 (patch) | |
tree | f8a3d6634bf3149e753dd0ea414c0c0079003708 /cop.h | |
parent | 8a7dc658e6602067382c308b2131d135e4063624 (diff) | |
download | perl-f86702ccfcc3646d7aa30b09ce4f4413be9f99d1.tar.gz |
[inseparable changes from patch from perl5.003_24 to perl5.003_25]perl-5.003_25
CORE LANGUAGE CHANGES
Subject: Make $] read-only
From: Chip Salzenberg <chip@perl.com>
Files: gv.c
Subject: New variable C<$^S> is a native version of C<$?>
From: Chip Salzenberg <chip@perl.com>
Files: doio.c global.sym gv.c interp.sym lib/English.pm mg.c perl.c perl.h pod/perldelta.pod pod/perlfunc.pod pod/perlvar.pod pp_ctl.c pp_sys.c proto.h util.c
Subject: Make $^T work with undump, and don't taint it
From: Chip Salzenberg <chip@perl.com>
Files: perl.c
CORE PORTABILITY
Subject: VMS patches for _24
Date: Fri, 31 Jan 1997 02:34:37 -0500 (EST)
From: Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU>
Files: ext/DynaLoader/DynaLoader.pm ext/DynaLoader/dl_vms.xs lib/AutoSplit.pm lib/ExtUtils/MM_VMS.pm lib/ExtUtils/MakeMaker.pm perl.h pp_hot.c t/lib/filehand.t t/op/closure.t vms/Makefile vms/config.vms vms/descrip.mms vms/ext/filespec.t vms/vms.c vms/vmsish.h
private-msgid: <01IEUIFP5038004GQP@hmivax.humgen.upenn.edu>
DOCUMENTATION
Subject: Document how extension pms go in $archlib
From: Chip Salzenberg <chip@perl.com>
Files: pod/perldelta.pod
Subject: perlfunc.pod tweaks
Date: Thu, 30 Jan 1997 16:20:55 -0500
From: Roderick Schertler <roderick@gate.net>
Files: pod/perlfunc.pod
private-msgid: <20526.854659255@eeyore.ibcinc.com>
Subject: Error lines must not have trailing periods
From: Chip Salzenberg <chip@perl.com>
Files: pod/perldiag.pod
LIBRARY AND EXTENSIONS
Subject: Make IO::Handle::gets() an alias of getline
Date: Thu, 30 Jan 1997 12:03:15 +0100
From: Gisle Aas <aas@bergen.sn.no>
Files: ext/IO/lib/IO/Handle.pm lib/IO/Handle.pm
private-msgid: <199701301103.MAA11291@bergen.sn.no>
OTHER CORE CHANGES
Subject: Require '-T' in argv[], not just on #! line
From: Chip Salzenberg <chip@perl.com>
Files: perl.c pod/perldiag.pod
Subject: Fix C<return @_> and associated stack bugs
From: Chip Salzenberg <chip@perl.com>
Files: cop.h pp_ctl.c pp_hot.c t/op/misc.t
Subject: Fix never-closing handle after C<select>
From: Chip Salzenberg <chip@perl.com>
Files: pp_sys.c
Subject: Fix /\G/g with patterns that match empty string
From: Ilya Zakharevich <ilya@math.ohio-state.edu>
Files: pp_hot.c
Subject: Don't create AV, HV, IO when assigning glob
From: Chip Salzenberg <chip@perl.com>
Files: mg.c
TESTS
Subject: More Amiga test patches
Date: Wed, 29 Jan 1997 16:07:33 +0100
From: "Norbert Pueschel" <pueschel@imsdd.meb.uni-bonn.de>
Files: README.amiga t/lib/safe2.t t/op/closure.t
private-msgid: <77724725@Armageddon.meb.uni-bonn.de>
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 49 |
1 files changed, 30 insertions, 19 deletions
@@ -46,23 +46,26 @@ struct block_sub { cx->blk_sub.dfoutgv = defoutgv; \ (void)SvREFCNT_inc(cx->blk_sub.dfoutgv) -/* We muck with cxstack_ix since _dec may call a DESTROY, overwriting cx. */ - #define POPSUB(cx) \ - if (cx->blk_sub.hasargs) { \ + { struct block_sub cxsub; \ + POPSUB1(cx); \ + POPSUB2(); } + +#define POPSUB1(cx) \ + cxsub = cx->blk_sub; /* because DESTROY may clobber *cx */ + +#define POPSUB2() \ + if (cxsub.hasargs) { \ /* put back old @_ */ \ SvREFCNT_dec(GvAV(defgv)); \ - GvAV(defgv) = cx->blk_sub.savearray; \ + GvAV(defgv) = cxsub.savearray; \ /* destroy arg array */ \ - av_clear(cx->blk_sub.argarray); \ - AvREAL_off(cx->blk_sub.argarray); \ + av_clear(cxsub.argarray); \ + AvREAL_off(cxsub.argarray); \ } \ - if (cx->blk_sub.cv) { \ - if (!(CvDEPTH(cx->blk_sub.cv) = cx->blk_sub.olddepth)) { \ - cxstack_ix++; \ - SvREFCNT_dec((SV*)cx->blk_sub.cv); \ - cxstack_ix--; \ - } \ + if (cxsub.cv) { \ + if (!(CvDEPTH(cxsub.cv) = cxsub.olddepth)) \ + SvREFCNT_dec(cxsub.cv); \ } #define POPFORMAT(cx) \ @@ -117,14 +120,22 @@ struct block_loop { cx->blk_loop.iterix = -1; #define POPLOOP(cx) \ - newsp = stack_base + cx->blk_loop.resetsp; \ - SvREFCNT_dec(cx->blk_loop.iterlval); \ - if (cx->blk_loop.itervar) { \ - SvREFCNT_dec(*cx->blk_loop.itervar); \ - *cx->blk_loop.itervar = cx->blk_loop.itersave; \ + { struct block_loop cxloop; \ + POPLOOP1(cx); \ + POPLOOP2(); } + +#define POPLOOP1(cx) \ + cxloop = cx->blk_loop; /* because DESTROY may clobber *cx */ + +#define POPLOOP2() \ + newsp = stack_base + cxloop.resetsp; \ + SvREFCNT_dec(cxloop.iterlval); \ + if (cxloop.itervar) { \ + SvREFCNT_dec(*cxloop.itervar); \ + *cxloop.itervar = cxloop.itersave; \ } \ - if (cx->blk_loop.iterary && cx->blk_loop.iterary != curstack) \ - SvREFCNT_dec(cx->blk_loop.iterary); + if (cxloop.iterary && cxloop.iterary != curstack) \ + SvREFCNT_dec(cxloop.iterary); /* context common to subroutines, evals and loops */ struct block { |