summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-11-04 13:25:49 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-11-13 04:49:43 -0800
commit04472a849792297300059ba880a7ad59900aa5b8 (patch)
treeb45e7fedc5d0315db8d05f3f07c88b32a6db882c /scope.c
parente4211fee6f4152b99074ac26f85747ac3fba448b (diff)
downloadperl-04472a849792297300059ba880a7ad59900aa5b8.tar.gz
pad.c:cv_clone_pad: Avoid copying sv
When we capture the lexical variable in order to make sub () {$x} constant, we don’t have to copy it if it is not modified or referenced elsewhere.
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index 0f819e7c9d..43e2e03119 100644
--- a/scope.c
+++ b/scope.c
@@ -1079,7 +1079,6 @@ Perl_leave_scope(pTHX_ I32 base)
SvPADSTALE_on(sv); /* mark as no longer live */
}
else { /* Someone has a claim on this, so abandon it. */
- assert(!(SvFLAGS(sv) & SVs_PADTMP));
switch (SvTYPE(sv)) { /* Console ourselves with a new value */
case SVt_PVAV: *svp = MUTABLE_SV(newAV()); break;
case SVt_PVHV: *svp = MUTABLE_SV(newHV()); break;