>> RXf_PMf_STD_PMMOD_SHIFT);
const char *fptr = STD_PAT_MODS; /*"msix"*/
char *p;
- RX_WRAPLEN(rx) = plen + has_minus + has_p + has_runon
+ const STRLEN wraplen = plen + has_minus + has_p + has_runon
+ (sizeof(STD_PAT_MODS) - 1)
+ (sizeof("(?:)") - 1);
- p = sv_grow(rx, RX_WRAPLEN(rx) + 1);
- SvCUR_set(rx, RX_WRAPLEN(rx));
+ p = sv_grow(rx, wraplen + 1);
+ SvCUR_set(rx, wraplen);
SvPOK_on(rx);
*p++='('; *p++='?';
if (has_p)
/* Information about the match that isn't often used */
- I32 wraplen; /* length of wrapped */
unsigned pre_prefix:4; /* offset from wrapped to the start of precomp */
unsigned seen_evals:28; /* number of eval groups in the pattern - for security checks */
HV *paren_names; /* Optional hash of paren names */
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) (((struct regexp *)SvANY(prog))->wraplen)
+#define RX_WRAPLEN(prog) SvCUR(prog)
#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)