summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-10-11 00:13:07 +0100
committerDavid Mitchell <davem@iabyn.com>2010-10-11 00:41:18 +0100
commitb98b62bccdcb420ec5430eb831023e3d91ab2fa0 (patch)
tree92b913a5739af6fe7c0501f1af63f590d671c7ef /sv.c
parentdf90f6afd9a2814197a1dd002454410c69b7fed6 (diff)
downloadperl-b98b62bccdcb420ec5430eb831023e3d91ab2fa0.tar.gz
make sv_clear() non-recursive on RVs
The previous two commits made it non-recursive on AVs. With that machinery in place, it's now trivial to extend it to RVs too. This means that now any depth nesting of AVs and RVs will be freed in a single call to sv_clear().
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index da84e4f180..1c8d6dd979 100644
--- a/sv.c
+++ b/sv.c
@@ -6021,7 +6021,7 @@ Perl_sv_clear(pTHX_ SV *const orig_sv)
if (SvWEAKREF(sv))
sv_del_backref(target, sv);
else
- SvREFCNT_dec(target);
+ next_sv = target;
}
}
#ifdef PERL_OLD_COPY_ON_WRITE