Change 11714 by jhi@alpha on 2001/08/18 06:03:24
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.
Affected files ...
... //depot/perl/pp_hot.c#252 edit
... //depot/perl/t/op/pat.t#115 edit
Differences ...
==== //depot/perl/pp_hot.c#252 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c.~1~ Sat Aug 18 00:15:05 2001
+++ perl/pp_hot.c Sat Aug 18 00:15:05 2001
@@ -1222,7 +1222,7 @@
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 @@
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);
==== //depot/perl/t/op/pat.t#115 (xtext) ====
Index: perl/t/op/pat.t
--- perl/t/op/pat.t.~1~ Sat Aug 18 00:15:05 2001
+++ perl/t/op/pat.t Sat Aug 18 00:15:05 2001
@@ -6,7 +6,7 @@
$| = 1;
-print "1..686\n";
+print "1..684\n";
BEGIN {
chdir 't' if -d 't';
@@ -1987,22 +1987,3 @@
$c = pos;
print "$a $b $c" eq 'ba:ba ad:ae 10' ? "ok 684\n" : "not ok 684\t# $a $b $c\n";
}
-
-{
- package ID_20010407_006;
-
- sub x {
- "a\x{1234}";
- }
-
- my $x = x;
- my $y;
-
- $x =~ /(..)/; $y = $1;
- print "not " unless length($y) == 2 && $y eq $x;
- print "ok 685\n" if length($y) == 2;
-
- x =~ /(..)/; $y = $1;
- print "not " unless length($y) == 2 && $y eq $x;
- print "ok 686\n";
-}
End of Patch.