diff options
author | Doug MacEachern <dougm@covalent.net> | 2001-08-04 04:09:37 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-04 17:31:06 +0000 |
commit | 01485f8b60f6cb9da6ceaaafc3abd52c6f690081 (patch) | |
tree | 5f71cc4f2573727eb35514aa07985fe6a57624c7 /sv.c | |
parent | f33976b4825a1f900bb28e78ad0509286ad2ffe5 (diff) | |
download | perl-01485f8b60f6cb9da6ceaaafc3abd52c6f690081.tar.gz |
Re: [patch] rid "Scalars leaked" from perl_clone
Message-ID: <Pine.LNX.4.21.0108041102390.23972-100000@mako.covalent.net>
p4raw-id: //depot/perl@11576
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -9090,6 +9090,11 @@ Perl_sv_dup(pTHX_ SV *sstr, clone_params* param) CvROOT(dstr) = OpREFCNT_inc(CvROOT(sstr)); CvXSUB(dstr) = CvXSUB(sstr); CvXSUBANY(dstr) = CvXSUBANY(sstr); + if (CvCONST(sstr)) { + CvXSUBANY(dstr).any_ptr = GvUNIQUE(CvGV(sstr)) ? + SvREFCNT_inc(CvXSUBANY(sstr).any_ptr) : + sv_dup_inc(CvXSUBANY(sstr).any_ptr, param); + } CvGV(dstr) = gv_dup(CvGV(sstr), param); if (param->flags & CLONEf_COPY_STACKS) { CvDEPTH(dstr) = CvDEPTH(sstr); |