const char *const p = SvPV(pat, len);
pat = newSVpvn_flags(p, len, SVs_TEMP);
}
- assert(!(pm_flags & RXf_UTF8));
PM_SETRE(pm, CALLREGCOMP(pat, pm_flags));
const char *const p = SvPV(tmpstr, len);
tmpstr = newSVpvn_flags(p, len, SVs_TEMP);
}
- assert(!(pm_flags & RXf_UTF8));
if (eng)
PM_SETRE(pm, CALLREGCOMP_ENG(eng, tmpstr, pm_flags));
DEBUG_r(if (!PL_colorset) reginitcolors());
RExC_utf8 = RExC_orig_utf8 = SvUTF8(pattern);
- assert(!(pm_flags & RXf_UTF8));
- if (RExC_utf8)
- pm_flags |= RXf_UTF8;
DEBUG_COMPILE_r({
SV *dsv= sv_newmortal();
p = sv_grow(rx, wraplen + 1);
SvCUR_set(rx, wraplen);
SvPOK_on(rx);
+ SvFLAGS(rx) |= SvUTF8(pattern);
*p++='('; *p++='?';
if (has_p)
*p++ = KEEPCOPY_PAT_MOD; /*'p'*/
/*dmq: removed as part of de-PMOP: pm->op_pmflags = RExC_flags; */
if (UTF)
- r->extflags |= RXf_UTF8; /* Unicode in it? */
+ SvUTF8_on(rx); /* Unicode in it? */
ri->regstclass = NULL;
if (RExC_naughty >= 10) /* Probably an expensive pattern. */
r->intflags |= PREGf_NAUGHTY;
space in the copy is zero. As we've just done a struct copy, it's now
a case of zero-ing that, rather than copying the current length. */
SvPV_set(ret_x, RX_WRAPPED(rx));
+ SvFLAGS(ret_x) |= SvFLAGS(rx) & (SVf_POK|SVp_POK|SVf_UTF8);
StructCopy(r, ret, regexp);
SvLEN_set(ret_x, 0);
Newx(ret->offs, npar, regexp_paren_pair);
const char *const p = SvPV(ret, len);
ret = newSVpvn_flags(p, len, SVs_TEMP);
}
- assert(!(pm_flags & RXf_UTF8));
rx = CALLREGCOMP(ret, pm_flags);
if (!(SvFLAGS(ret)
& (SVs_TEMP | SVs_PADTMP | SVf_READONLY
#define RXf_CHECK_ALL 0x00040000
/* UTF8 related */
-#define RXf_UTF8 0x00080000
#define RXf_MATCH_UTF8 0x00100000
/* Intuit related */
: (RX_MATCH_UTF8_off(prog), (PL_reg_match_utf8 = 0)))
/* Whether the pattern stored at RX_WRAPPED is in UTF-8 */
-#define RX_UTF8(prog) (RX_EXTFLAGS(prog) & RXf_UTF8)
+#define RX_UTF8(prog) SvUTF8(prog)
#define REXEC_COPY_STR 0x01 /* Need to copy the string. */
#define REXEC_CHECKED 0x02 /* check_substr already checked. */
EXTCONST char * PL_reg_extflags_name[];
#else
EXTCONST char * const PL_reg_extflags_name[] = {
- /* Bits in extflags defined: 11111111111111111111111100111111 */
+ /* Bits in extflags defined: 11111111111101111111111100111111 */
"MULTILINE", /* 0x00000001 */
"SINGLELINE", /* 0x00000002 */
"FOLD", /* 0x00000004 */
"CANY_SEEN", /* 0x00010000 */
"NOSCAN", /* 0x00020000 */
"CHECK_ALL", /* 0x00040000 */
- "UTF8", /* 0x00080000 */
+ "UNUSED_BIT_19", /* 0x00080000 */
"MATCH_UTF8", /* 0x00100000 */
"USE_INTUIT_NOML", /* 0x00200000 */
"USE_INTUIT_ML", /* 0x00400000 */