Change 11651 by jhi@alpha on 2001/08/12 21:08:06

        More (less) regex/utf8 relics.

Affected files ...

... //depot/perl/op.c#427 edit
... //depot/perl/op.h#87 edit
... //depot/perl/pp_ctl.c#275 edit
... //depot/perl/regcomp.c#224 edit

Differences ...

==== //depot/perl/op.c#427 (text) ====
Index: perl/op.c
--- perl/op.c.~1~       Sun Aug 12 15:15:05 2001
+++ perl/op.c   Sun Aug 12 15:15:05 2001
@@ -3002,16 +3002,12 @@
            p = SvPV(pat, plen);
            pm->op_pmflags |= PMf_SKIPWHITE;
        }
-       if (DO_UTF8(pat))
-           pm->op_pmdynflags |= PMdf_UTF8;
        PM_SETRE(pm, CALLREGCOMP(aTHX_ p, p + plen, pm));
        if (strEQ("\\s+", PM_GETRE(pm)->precomp))
            pm->op_pmflags |= PMf_WHITE;
        op_free(expr);
     }
     else {
-       if (!IN_BYTES)
-           pm->op_pmdynflags |= PMdf_UTF8;
        if (pm->op_pmflags & PMf_KEEP || !(PL_hints & HINT_RE_EVAL))
            expr = newUNOP((!(PL_hints & HINT_RE_EVAL)
                            ? OP_REGCRESET

==== //depot/perl/op.h#87 (text) ====
Index: perl/op.h
--- perl/op.h.~1~       Sun Aug 12 15:15:05 2001
+++ perl/op.h   Sun Aug 12 15:15:05 2001
@@ -263,10 +263,6 @@
 
 #define PMdf_USED      0x01            /* pm has been used once already */
 #define PMdf_TAINTED   0x02            /* pm compiled from tainted pattern */
-#define PMdf_UTF8      0x04            /* pm compiled from utf8 data */
-#define PMdf_DYN_UTF8  0x08
-
-#define PMdf_CMP_UTF8  (PMdf_UTF8|PMdf_DYN_UTF8)
 
 #define PMf_RETAINT    0x0001          /* taint $1 etc. if target tainted */
 #define PMf_ONCE       0x0002          /* use pattern only once per reset */

==== //depot/perl/pp_ctl.c#275 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c.~1~   Sun Aug 12 15:15:05 2001
+++ perl/pp_ctl.c       Sun Aug 12 15:15:05 2001
@@ -121,16 +121,7 @@
                PL_reginterp_cnt = I32_MAX; /* Mark as safe.  */
 
            pm->op_pmflags = pm->op_pmpermflags;        /* reset case sensitivity */
-           if (DO_UTF8(tmpstr))
-               pm->op_pmdynflags |= PMdf_DYN_UTF8;
-           else {
-               pm->op_pmdynflags &= ~PMdf_DYN_UTF8;
-               if (pm->op_pmdynflags & PMdf_UTF8)
-                   t = (char*)bytes_to_utf8((U8*)t, &len);
-           }
            PM_SETRE(pm, CALLREGCOMP(aTHX_ t, t + len, pm));
-           if (!DO_UTF8(tmpstr) && (pm->op_pmdynflags & PMdf_UTF8))
-               Safefree(t);
            PL_reginterp_cnt = 0;       /* XXXX Be extra paranoid - needed
                                           inside tie/overload accessors.  */
        }

==== //depot/perl/regcomp.c#224 (text) ====
Index: perl/regcomp.c
--- perl/regcomp.c.~1~  Sun Aug 12 15:15:05 2001
+++ perl/regcomp.c      Sun Aug 12 15:15:05 2001
@@ -1666,11 +1666,7 @@
     if (exp == NULL)
        FAIL("NULL regexp argument");
 
-    /* XXXX This looks very suspicious... */
-    if (pm->op_pmdynflags & PMdf_CMP_UTF8)
-        RExC_utf8 = 1;
-    else
-        RExC_utf8 = 0;
+    RExC_utf8 = 0;
 
     RExC_precomp = exp;
     DEBUG_r(if (!PL_colorset) reginitcolors());
End of Patch.

Reply via email to