summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-01-02 12:45:09 -0700
committerKarl Williamson <khw@cpan.org>2021-01-03 05:56:55 -0700
commit12c5822e63454624e46d26e95b1964592be3affe (patch)
tree2e0e53f0323472cd6944c61322fca249e94bf1a7 /regexec.c
parent52c50ff1ed8dbfeb5b2be8f606d40f5a0f2004eb (diff)
downloadperl-12c5822e63454624e46d26e95b1964592be3affe.tar.gz
regexec.c: Clarify comments
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/regexec.c b/regexec.c
index 2a5fa540bc..3ca2288361 100644
--- a/regexec.c
+++ b/regexec.c
@@ -4849,8 +4849,8 @@ S_setup_EXACTISH_ST(pTHX_ const regnode * const text_node,
lengths[m->count] = UVCHR_SKIP(fold_from);
m->count++;
}
- else { /* Non-UTF8 target: any code point above 255
- can't appear in it */
+ else { /* Non-UTF8 target: no code point above 255 can appear in it
+ */
if (fold_from > 255) {
continue;
}
@@ -4973,7 +4973,10 @@ S_setup_EXACTISH_ST(pTHX_ const regnode * const text_node,
if (m->count > 1) { /* No need to sort a single entry */
for (i = 0; i < (PERL_UINT_FAST8_T) m->count; i++) {
- /* Keep the same order for all but the longest */
+ /* Keep the same order for all but the longest. (If the
+ * asserts fail, it could be because m->matches is declared too
+ * short, either because of a new Unicode release, or an
+ * overlooked test case, or it could be a bug.) */
if (i != index_of_longest) {
assert(cur_pos + lengths[i] <= C_ARRAY_LENGTH(m->matches));
Copy(matches[i], m->matches + cur_pos, lengths[i], U8);