summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-11-18 16:17:22 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-11-18 17:46:22 -0800
commitf1f99dc1f9e949ceafeeaead7b5f43b1aab8224d (patch)
treefde3661f64ce0fa8770460a2fcdc3a0856193da9 /scope.c
parent9710ad417eae30e33b2583df714e850505d81f47 (diff)
downloadperl-f1f99dc1f9e949ceafeeaead7b5f43b1aab8224d.tar.gz
Copy magic during localisation even for GVs
The magic-copying is skipped for GVs. This logic goes back to perl 5.000 (patch a0d0e21e). I think it has always been wrong.
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index f14be1e4bf..cb0e8c5b35 100644
--- a/scope.c
+++ b/scope.c
@@ -181,7 +181,7 @@ S_save_scalar_at(pTHX_ SV **sptr, const U32 flags)
osv = *sptr;
sv = (flags & SAVEf_KEEPOLDELEM) ? osv : (*sptr = newSV(0));
- if (SvTYPE(osv) >= SVt_PVMG && SvMAGIC(osv) && SvTYPE(osv) != SVt_PVGV) {
+ if (SvTYPE(osv) >= SVt_PVMG && SvMAGIC(osv)) {
if (SvGMAGICAL(osv)) {
SvFLAGS(osv) |= (SvFLAGS(osv) &
(SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT;