>> RXf_PMf_STD_PMMOD_SHIFT);
const char *fptr = STD_PAT_MODS; /*"msix"*/
char *p;
- RXp_WRAPLEN(r) = plen + has_minus + has_p + has_runon
+ RX_WRAPLEN(rx) = plen + has_minus + has_p + has_runon
+ (sizeof(STD_PAT_MODS) - 1)
+ (sizeof("(?:)") - 1);
- p = sv_grow(rx, RXp_WRAPLEN(r) + 1);
- SvCUR_set(rx, RXp_WRAPLEN(r));
+ p = sv_grow(rx, RX_WRAPLEN(rx) + 1);
+ SvCUR_set(rx, RX_WRAPLEN(rx));
SvPOK_on(rx);
*p++='('; *p++='?';
if (has_p)
r->paren_names = NULL;
#ifdef STUPID_PATTERN_CHECKS
- if (RX_PRELEN(r) == 0)
+ if (RX_PRELEN(rx) == 0)
r->extflags |= RXf_NULL;
- if (r->extflags & RXf_SPLIT && RX_PRELEN(r) == 1 && RX_PRECOMP(rx)[0] == ' ')
+ if (r->extflags & RXf_SPLIT && RX_PRELEN(rx) == 1 && RX_PRECOMP(rx)[0] == ' ')
/* XXX: this should happen BEFORE we compile */
r->extflags |= (RXf_SKIPWHITE|RXf_WHITE);
- else if (RX_PRELEN(r) == 3 && memEQ("\\s+", RXp_PRECOMP(r), 3))
+ else if (RX_PRELEN(rx) == 3 && memEQ("\\s+", RX_PRECOMP(rx), 3))
r->extflags |= RXf_WHITE;
- else if (RX_PRELEN(r) == 1 && RXp_PRECOMP(r)[0] == '^')
+ else if (RX_PRELEN(rx) == 1 && RXp_PRECOMP(rx)[0] == '^')
r->extflags |= RXf_START_ONLY;
#else
- if (r->extflags & RXf_SPLIT && RXp_PRELEN(r) == 1 && RX_PRECOMP(rx)[0] == ' ')
+ if (r->extflags & RXf_SPLIT && RX_PRELEN(rx) == 1 && RX_PRECOMP(rx)[0] == ' ')
/* XXX: this should happen BEFORE we compile */
r->extflags |= (RXf_SKIPWHITE|RXf_WHITE);
else {
{
SV *dsv= sv_newmortal();
RE_PV_QUOTED_DECL(s, (r->extflags & RXf_UTF8),
- dsv, RX_PRECOMP(rx), RXp_PRELEN(r), 60);
+ dsv, RX_PRECOMP(rx), RX_PRELEN(rx), 60);
PerlIO_printf(Perl_debug_log,"%sFreeing REx:%s %s\n",
PL_colors[4],PL_colors[5],s);
}
? RX_MATCH_COPIED_on(prog) \
: RX_MATCH_COPIED_off(prog))
-/* FIXME? Are we hardcoding too much here and constraining plugin extension
- writers? Specifically, the value 1 assumes that the wrapped version always
- has exactly one character at the end, a ')'. Will that always be true? */
-#define RXp_PRELEN(rx) ((rx)->wraplen - (rx)->pre_prefix - 1)
-#define RXp_WRAPLEN(rx) ((rx)->wraplen)
#define RXp_EXTFLAGS(rx) ((rx)->extflags)
/* For source compatibility. We used to store these explicitly. */
#define RX_PRECOMP(prog) (RX_WRAPPED(prog) + ((struct regexp *)SvANY(prog))->pre_prefix)
-#define RX_PRELEN(prog) RXp_PRELEN((struct regexp *)SvANY(prog))
+/* FIXME? Are we hardcoding too much here and constraining plugin extension
+ writers? Specifically, the value 1 assumes that the wrapped version always
+ has exactly one character at the end, a ')'. Will that always be true? */
+#define RX_PRELEN(prog) (RX_WRAPLEN(prog) - ((struct regexp *)SvANY(prog))->pre_prefix - 1)
#define RX_WRAPPED(prog) SvPVX(prog)
-#define RX_WRAPLEN(prog) RXp_WRAPLEN((struct regexp *)SvANY(prog))
+#define RX_WRAPLEN(prog) (((struct regexp *)SvANY(prog))->wraplen)
#define RX_CHECK_SUBSTR(prog) (((struct regexp *)SvANY(prog))->check_substr)
#define RX_EXTFLAGS(prog) RXp_EXTFLAGS((struct regexp *)SvANY(prog))
#define RX_REFCNT(prog) SvREFCNT(prog)