Change 14205 by jhi@alpha on 2002/01/12 04:55:20

        Unicode lookbehind looked bad.

Affected files ...

.... //depot/perl/regexec.c#249 edit
.... //depot/perl/t/op/pat.t#149 edit

Differences ...

==== //depot/perl/regexec.c#249 (text) ====
Index: perl/regexec.c
--- perl/regexec.c.~1~  Fri Jan 11 22:00:05 2002
+++ perl/regexec.c      Fri Jan 11 22:00:05 2002
@@ -111,7 +111,7 @@
 #define HOPMAYBEc(pos,off) ((char*)HOPMAYBE(pos,off))
 
 #define HOPBACK(pos, off) (            \
-    (UTF && PL_reg_match_utf8)         \
+    (PL_reg_match_utf8)                        \
        ? reghopmaybe((U8*)pos, -off)   \
     : (pos - off >= PL_bostr)          \
        ? (U8*)(pos - off)              \

==== //depot/perl/t/op/pat.t#149 (xtext) ====
Index: perl/t/op/pat.t
--- perl/t/op/pat.t.~1~ Fri Jan 11 22:00:05 2002
+++ perl/t/op/pat.t     Fri Jan 11 22:00:05 2002
@@ -6,7 +6,7 @@
 
 $| = 1;
 
-print "1..846\n";
+print "1..847\n";
 
 BEGIN {
     chdir 't' if -d 't';
@@ -2652,3 +2652,10 @@
     $r2 =~ s/\x{100}//;
     print $r1 eq $r2 ? "ok 846\n" : "not ok 846\n";
 }
+
+{
+    print "# Unicode lookbehind\n";
+
+    print "A\x{100}B"        =~ /(?<=A.)B/  ? "ok 847\n" : "not ok 847\n";
+    print "A\x{200}\x{300}B" =~ /(?<=A..)B/ ? "ok 848\n" : "not ok 848\n";
+}
End of Patch.

Reply via email to