summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-03-31 13:45:57 +0000
committerNicholas Clark <nick@ccl4.org>2006-03-31 13:45:57 +0000
commitb3ca2e834c3607fd8aa8736a51aa3a2b8bba1044 (patch)
treef1269aa993bfdc23b5f797da9cb5920a56cec989 /sv.c
parent1eed7ad13024ea01ff5ebed041ba65b758770a0f (diff)
downloadperl-b3ca2e834c3607fd8aa8736a51aa3a2b8bba1044.tar.gz
Serialise changes to %^H onto the current COP. Return the compile time
state of %^H as an eleventh value from caller. This allows users to write pragmas. p4raw-id: //depot/perl@27643
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index ded27c951d..d5cc44d190 100644
--- a/sv.c
+++ b/sv.c
@@ -4489,6 +4489,8 @@ Perl_sv_magic(pTHX_ register SV *sv, SV *obj, int how, const char *name, I32 nam
case PERL_MAGIC_qr:
vtable = &PL_vtbl_regexp;
break;
+ case PERL_MAGIC_hints:
+ /* As this vtable is all NULL, we can reuse it. */
case PERL_MAGIC_sig:
vtable = &PL_vtbl_sig;
break;
@@ -4528,6 +4530,9 @@ Perl_sv_magic(pTHX_ register SV *sv, SV *obj, int how, const char *name, I32 nam
case PERL_MAGIC_backref:
vtable = &PL_vtbl_backref;
break;
+ case PERL_MAGIC_hintselem:
+ vtable = &PL_vtbl_hintselem;
+ break;
case PERL_MAGIC_ext:
/* Reserved for use by extensions not perl internals. */
/* Useful for attaching extension internal data to perl vars. */
@@ -10573,6 +10578,10 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
case SAVEt_HINTS:
i = POPINT(ss,ix);
TOPINT(nss,ix) = i;
+ ptr = POPPTR(ss,ix);
+ TOPPTR(nss,ix) = Perl_refcounted_he_dup(aTHX_ ptr, param);
+ /* FIXME - either dup the conditionally saved HV, or eliminate
+ it by recreating eval's %^H from the cop */
break;
case SAVEt_COMPPAD:
av = (AV*)POPPTR(ss,ix);
@@ -10857,6 +10866,8 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_compiling.cop_warnings = sv_dup_inc(PL_compiling.cop_warnings, param);
if (!specialCopIO(PL_compiling.cop_io))
PL_compiling.cop_io = sv_dup_inc(PL_compiling.cop_io, param);
+ PL_compiling.cop_hints
+ = Perl_refcounted_he_dup(aTHX_ PL_compiling.cop_hints, proto_perl);
PL_curcop = (COP*)any_dup(proto_perl->Tcurcop, proto_perl);
/* pseudo environmental stuff */