summaryrefslogtreecommitdiff
path: root/regexp.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-01-02 10:18:26 -0700
committerKarl Williamson <khw@cpan.org>2021-01-03 05:56:55 -0700
commit52c50ff1ed8dbfeb5b2be8f606d40f5a0f2004eb (patch)
tree8ca6fa46441aeea286726a6115ac1d6ed6728400 /regexp.h
parentb0a5c47fb08a6483b52748f0d36c6b83ef4a3339 (diff)
downloadperl-52c50ff1ed8dbfeb5b2be8f606d40f5a0f2004eb.tar.gz
regexp.h: Clarify how a computed value is derived.
Diffstat (limited to 'regexp.h')
-rw-r--r--regexp.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/regexp.h b/regexp.h
index 43a5168f74..c4210edf84 100644
--- a/regexp.h
+++ b/regexp.h
@@ -712,11 +712,12 @@ typedef struct {
# define MAX_RECURSE_EVAL_NOCHANGE_DEPTH 10
#endif
-/* The +3 is based on the current Unicode standards needs, and is unlikely to
- * change. An assertion should fail in regexec.c if it is too low. It is
- * needed for certain edge cases involving multi-character folds when the first
- * component also participates in a fold individually. */
-#define MAX_MATCHES (MAX_FOLD_FROMS + 3)
+/* The +1 is because everything matches itself, which isn't included in
+ * MAX_FOLD_FROMS; the +2 is based on the current Unicode standards needs, and
+ * is unlikely to change. An assertion should fail in regexec.c if it is too
+ * low. It is needed for certain edge cases involving multi-character folds
+ * when the first component also participates in a fold individually. */
+#define MAX_MATCHES (MAX_FOLD_FROMS + 1 + 2)
struct next_matchable_info {
U8 first_byte_mask;