summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index aeb205542d..408cc77587 100644
--- a/sv.c
+++ b/sv.c
@@ -2355,7 +2355,7 @@ sv_magic(register SV *sv, SV *obj, int how, char *name, I32 namlen)
mg->mg_moremagic = SvMAGIC(sv);
SvMAGIC(sv) = mg;
- if (!obj || obj == sv || how == '#')
+ if (!obj || obj == sv || how == '#' || how == 'r')
mg->mg_obj = obj;
else {
dTHR;
@@ -2435,6 +2435,9 @@ sv_magic(register SV *sv, SV *obj, int how, char *name, I32 namlen)
case 'q':
mg->mg_virtual = &vtbl_packelem;
break;
+ case 'r':
+ mg->mg_virtual = &vtbl_regexp;
+ break;
case 'S':
mg->mg_virtual = &vtbl_sig;
break;
@@ -4657,6 +4660,10 @@ sv_dump(SV *sv)
sv_catpv(d, " ),");
}
}
+ case SVt_PVBM:
+ if (SvTAIL(sv)) sv_catpv(d, "TAIL,");
+ if (SvCOMPILED(sv)) sv_catpv(d, "COMPILED,");
+ break;
}
if (*(SvEND(d) - 1) == ',')