summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-01-24 11:11:02 -0700
committerKarl Williamson <khw@cpan.org>2020-02-19 18:18:40 -0700
commitf1f5d51d61d3b95058950a4835a9cadfd8f2ad28 (patch)
tree07485b5a13a1184f03220d420c002645cffb6690
parent011c085a2f9041d0574c6ff8687fa08eb273ffca (diff)
downloadperl-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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/regcomp.c b/regcomp.c
index d56848b95e..9cad719a81 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -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;
}