diff options
author | Karl Williamson <khw@cpan.org> | 2021-01-02 10:18:26 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-01-03 05:56:55 -0700 |
commit | 52c50ff1ed8dbfeb5b2be8f606d40f5a0f2004eb (patch) | |
tree | 8ca6fa46441aeea286726a6115ac1d6ed6728400 | |
parent | b0a5c47fb08a6483b52748f0d36c6b83ef4a3339 (diff) | |
download | perl-52c50ff1ed8dbfeb5b2be8f606d40f5a0f2004eb.tar.gz |
regexp.h: Clarify how a computed value is derived.
-rw-r--r-- | regexp.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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; |