diff options
author | Karl Williamson <khw@cpan.org> | 2019-03-18 21:43:34 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-03-19 10:20:28 -0600 |
commit | 52bcf2657b8c6ee52d2eeb841fc2607db893f58f (patch) | |
tree | 12135ba40c56bb37e1f6819100f6b3c13e382698 | |
parent | 9edbb8b2d2f1fc6dd6ab01894735f5fd43a32966 (diff) | |
download | perl-52bcf2657b8c6ee52d2eeb841fc2607db893f58f.tar.gz |
regexec.c: Add comments
-rw-r--r-- | regexec.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -6127,6 +6127,8 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) while (chars) { if (utf8_target) { + /* XXX This assumes the length is well-formed, as + * does the UTF8SKIP below */ uvc = utf8n_to_uvchr((U8*)uc, UTF8_MAXLEN, &len, uniflags); uc += len; @@ -8235,6 +8237,11 @@ NULL ); if (! NEXTCHR_IS_EOS && ST.c1 != CHRTEST_VOID) { if (! UTF8_IS_INVARIANT(nextchr) && utf8_target) { + + /* (We can use memEQ and memNE in this file without + * having to worry about one being shorter than the + * other, since the first byte of each gives the + * length of the character) */ if (memNE(locinput, ST.c1_utf8, UTF8SKIP(locinput)) && memNE(locinput, ST.c2_utf8, UTF8SKIP(locinput))) { |