diff options
author | Karl Williamson <khw@cpan.org> | 2018-10-14 16:50:59 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-10-20 00:09:55 -0600 |
commit | bec95d5a289feff3ffa0c7f4f0e461b758c27d5f (patch) | |
tree | aad67886587b5e6f6c45ff8ee7758f9788dd860f | |
parent | 8a7485e7873e6208bc5cce3a0c49a79afcba6d43 (diff) | |
download | perl-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } |