summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-10-14 16:50:59 -0600
committerKarl Williamson <khw@cpan.org>2018-10-20 00:09:55 -0600
commitbec95d5a289feff3ffa0c7f4f0e461b758c27d5f (patch)
treeaad67886587b5e6f6c45ff8ee7758f9788dd860f
parent8a7485e7873e6208bc5cce3a0c49a79afcba6d43 (diff)
downloadperl-bec95d5a289feff3ffa0c7f4f0e461b758c27d5f.tar.gz
regcomp.c: Defer setting regnode operand
Don't set this until we know that we are actually going to have a regnode that requires this operand.
-rw-r--r--regcomp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/regcomp.c b/regcomp.c
index 36c59c9b8a..290f8b4749 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -18025,10 +18025,6 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
/****** !SIZE_ONLY (Pass 2) AFTER HERE *********/
- if (posixl) {
- ANYOF_POSIXL_SET_TO_BITMAP(REGNODE_p(ret), posixl);
- }
-
/* If folding, we calculate all characters that could fold to or from the
* ones already on the list */
if (cp_foldable_list) {
@@ -18724,6 +18720,10 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
populate_ANYOF_from_invlist(REGNODE_p(ret), &cp_list);
+ if (posixl) {
+ ANYOF_POSIXL_SET_TO_BITMAP(REGNODE_p(ret), posixl);
+ }
+
if (invert) {
ANYOF_FLAGS(REGNODE_p(ret)) |= ANYOF_INVERT;
}