summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2007-03-18 23:43:05 +0000
committerDave Mitchell <davem@fdisolutions.com>2007-03-18 23:43:05 +0000
commite7cbf6c66722616e50aa4cda71d48adf3ae55201 (patch)
tree98cc19734f03c63bafcbce2cc494766d8b3ebc81 /mg.c
parent2767dea0ecb27303bd680fbd54b2844c30f29b75 (diff)
downloadperl-e7cbf6c66722616e50aa4cda71d48adf3ae55201.tar.gz
When restoring localised values, call set only on container magic.
Avoids (among other things), localised pos index being trashed at scope exit. p4raw-id: //depot/perl@30627
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mg.c b/mg.c
index 2f2d5ba471..6966f9c154 100644
--- a/mg.c
+++ b/mg.c
@@ -271,6 +271,8 @@ Perl_mg_set(pTHX_ SV *sv)
mg->mg_flags &= ~MGf_GSKIP; /* setting requires another read */
(SSPTR(mgs_ix, MGS*))->mgs_flags = 0;
}
+ if (PL_localizing == 2 && !S_is_container_magic(mg))
+ continue;
if (vtbl && vtbl->svt_set)
CALL_FPTR(vtbl->svt_set)(aTHX_ sv, mg);
}