summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-08-18 06:03:24 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-08-18 06:03:24 +0000
commit2615a7822b1e45b2a41b9663aba536ad46262534 (patch)
tree2956155700a9732883a219c8e5e57e31810625be /pp_hot.c
parent9fe74edeee952c534737f11a9cb0e134fbef1921 (diff)
downloadperl-2615a7822b1e45b2a41b9663aba536ad46262534.tar.gz
Retract #11712 for now. The real fix would probably
be something like making PL_reg_sv a copy (PV + UTF8) of the matched/substituted string (note: not just a SvPOK string, for example the stringified form of a ROK would be applicable) Beware of leaks. p4raw-id: //depot/perl@11714
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index c0c6fe888b..0f4a69326e 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1222,7 +1222,7 @@ PP(pp_match)
TARG = DEFSV;
EXTEND(SP,1);
}
- PL_reg_sv = SvREFCNT_inc(TARG);
+ PL_reg_sv = TARG;
PUTBACK; /* EVAL blocks need stack_sp. */
s = SvPV(TARG, len);
strend = s + len;
@@ -1909,7 +1909,7 @@ PP(pp_subst)
TARG = DEFSV;
EXTEND(SP,1);
}
- PL_reg_sv = SvREFCNT_inc(TARG);
+ PL_reg_sv = TARG;
do_utf8 = DO_UTF8(PL_reg_sv);
if (SvFAKE(TARG) && SvREADONLY(TARG))
sv_force_normal(TARG);