diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2006-01-02 12:09:37 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2006-01-02 12:09:37 +0000 |
commit | a5063e7cd8fef802efd25ffe9df2c3748f4254f6 (patch) | |
tree | d64839134e7ea4472187ba4d6b88f6dcaea8b65f /mg.c | |
parent | 7e35a1b7e6a7c6685061284278f26171e0070f33 (diff) | |
download | perl-a5063e7cd8fef802efd25ffe9df2c3748f4254f6.tar.gz |
add svt_local slot to magic vtable, and fix local $shared
p4raw-id: //depot/perl@26569
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -430,15 +430,12 @@ Perl_mg_localize(pTHX_ SV *sv, SV *nsv) continue; } - if ((mg->mg_flags & MGf_COPY) && vtbl->svt_copy) { - /* XXX calling the copy method is probably not correct. DAPM */ - (void)CALL_FPTR(vtbl->svt_copy)(aTHX_ sv, mg, nsv, - mg->mg_ptr, mg->mg_len); - } - else { + if ((mg->mg_flags & MGf_LOCAL) && vtbl->svt_local) + (void)CALL_FPTR(vtbl->svt_local)(aTHX_ nsv, mg); + else sv_magicext(nsv, mg->mg_obj, mg->mg_type, vtbl, mg->mg_ptr, mg->mg_len); - } + /* container types should remain read-only across localization */ SvFLAGS(nsv) |= SvREADONLY(sv); } |