diff options
author | Karl Williamson <khw@cpan.org> | 2020-01-24 11:11:02 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-02-19 18:18:40 -0700 |
commit | f1f5d51d61d3b95058950a4835a9cadfd8f2ad28 (patch) | |
tree | 07485b5a13a1184f03220d420c002645cffb6690 | |
parent | 011c085a2f9041d0574c6ff8687fa08eb273ffca (diff) | |
download | perl-f1f5d51d61d3b95058950a4835a9cadfd8f2ad28.tar.gz |
regcomp.c; ([?...]) are single char width
A regex set compiles to something that has width of exactly one
character. The change involved merely moving the setting of these flags
to before a return instead of after.
-rw-r--r-- | regcomp.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -18707,17 +18707,17 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, invert = FALSE; } + /* All possible optimizations below still have these characteristics. + * (Multi-char folds aren't SIMPLE, but they don't get this far in this + * routine) */ + *flagp |= HASWIDTH|SIMPLE; + if (ret_invlist) { *ret_invlist = cp_list; return RExC_emit; } - /* All possible optimizations below still have these characteristics. - * (Multi-char folds aren't SIMPLE, but they don't get this far in this - * routine) */ - *flagp |= HASWIDTH|SIMPLE; - if (anyof_flags & ANYOF_LOCALE_FLAGS) { RExC_contains_locale = 1; } |