diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-12-28 19:40:26 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-12-28 19:40:26 +0000 |
commit | e3d998840fa41946cf8ee609337ef4edea761fd2 (patch) | |
tree | ddaa2caa42b583a01133c1ab9ebd406aebfc5929 /sv.c | |
parent | e92fe45ca3d43fcecf4a99c92c2f56c28510dc64 (diff) | |
download | perl-e3d998840fa41946cf8ee609337ef4edea761fd2.tar.gz |
As the backreferences AV doesn't hold references on its contents,
surely it should have AvREAL turned off?
p4raw-id: //depot/perl@26517
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -4355,6 +4355,7 @@ Perl_sv_add_backref(pTHX_ SV *tsv, SV *sv) av = (AV*)mg->mg_obj; else { av = newAV(); + AvREAL_off(av); sv_magic(tsv, (SV*)av, PERL_MAGIC_backref, NULL, 0); /* av now has a refcnt of 2, which avoids it getting freed * before us during global cleanup. The extra ref is removed @@ -8997,6 +8998,7 @@ Perl_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS* param) SV **svp; I32 i; (void)SvREFCNT_inc(nmg->mg_obj = (SV*)newAV()); + AvREAL_off((AV*)nmg->mg_obj); svp = AvARRAY(av); for (i = AvFILLp(av); i >= 0; i--) { if (!svp[i]) continue; |