summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-01-19 22:17:07 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-01-19 22:17:07 +0000
commit68795e9367de98482c4a5830e6e94b51bd60f4e3 (patch)
treece6632db4435b22ae2f82e511a34f76563752e4a /mg.c
parent92110913508b9944d111285d9488f2f7b604919c (diff)
downloadperl-68795e9367de98482c4a5830e6e94b51bd60f4e3.tar.gz
Nearly-working threads re-structuring. Do not integrate,
submit-ing to get to Win32, and as "off site" backup. p4raw-id: //depot/perlio@14352
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mg.c b/mg.c
index c7ebca3817..36026431d5 100644
--- a/mg.c
+++ b/mg.c
@@ -319,7 +319,11 @@ Perl_mg_copy(pTHX_ SV *sv, SV *nsv, const char *key, I32 klen)
int count = 0;
MAGIC* mg;
for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) {
- if (isUPPER(mg->mg_type)) {
+ MGVTBL* vtbl = mg->mg_virtual;
+ if ((mg->mg_flags & MGf_COPY) && vtbl->svt_copy){
+ count += CALL_FPTR(vtbl->svt_copy)(aTHX_ sv, mg, nsv, key, klen);
+ }
+ else if (isUPPER(mg->mg_type)) {
sv_magic(nsv,
mg->mg_type == PERL_MAGIC_tied ? SvTIED_obj(sv, mg) :
(mg->mg_type == PERL_MAGIC_regdata && mg->mg_obj)