diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2003-08-10 02:35:30 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-10 17:55:03 +0000 |
commit | 6cbc0cd1d96dba8bcda440e8ed6dde3e7b3a050b (patch) | |
tree | 4be6611e784ab204ab7dc71613919cb9d0d57131 /pad.c | |
parent | d5a0d2f99e0b4c8cd215ae33ce31786e1b28a247 (diff) | |
download | perl-6cbc0cd1d96dba8bcda440e8ed6dde3e7b3a050b.tar.gz |
Re: [perl #23265] Nested anonymous subs
Message-ID: <20030810003530.GB6547@fdgroup.com>
p4raw-id: //depot/perl@20597
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -258,9 +258,15 @@ Perl_pad_undef(pTHX_ CV* cv) { assert(CvWEAKOUTSIDE(innercv)); CvWEAKOUTSIDE_off(innercv); - CvOUTSIDE(innercv) = outercv; CvOUTSIDE_SEQ(innercv) = seq; - SvREFCNT_inc(outercv); + /* don't relink to grandfather if he's being freed */ + if (SvREFCNT(outercv)) { + CvOUTSIDE(innercv) = outercv; + SvREFCNT_inc(outercv); + } + else { + CvOUTSIDE(innercv) = Nullcv; + } } } } |