diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2023-05-08 18:38:33 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2023-05-09 13:17:24 +0200 |
commit | 56468b52b2355a00c1dff2137c54136dbb031922 (patch) | |
tree | 460e18c342a0aa0ecb1f362ae351901b0dba5b45 /src/regex-emacs.h | |
parent | e9258a882a9b54f2992ae8ffd73e3da6bb3c4556 (diff) | |
download | emacs-56468b52b2355a00c1dff2137c54136dbb031922.tar.gz emacs-56468b52b2355a00c1dff2137c54136dbb031922.tar.bz2 emacs-56468b52b2355a00c1dff2137c54136dbb031922.zip |
Speed up skip-chars-{forward|reverse} with char classes
* src/regex-emacs.h (re_wctype_t): Add RECC_NUM_CLASSES.
* src/syntax.c (skip_chars, in_classes): Use an array on the stack
instead of a Lisp list for storing character classes.
Don't check all classes if there is a match in one.
Remove useless handle_iso_classes argument.
Diffstat (limited to 'src/regex-emacs.h')
-rw-r--r-- | src/regex-emacs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/regex-emacs.h b/src/regex-emacs.h index 1bc973363e9..bc357633135 100644 --- a/src/regex-emacs.h +++ b/src/regex-emacs.h @@ -187,7 +187,8 @@ typedef enum { RECC_ERROR = 0, RECC_DIGIT, RECC_XDIGIT, RECC_BLANK, RECC_SPACE, RECC_MULTIBYTE, RECC_NONASCII, - RECC_ASCII, RECC_UNIBYTE + RECC_ASCII, RECC_UNIBYTE, + RECC_NUM_CLASSES = RECC_UNIBYTE } re_wctype_t; extern bool re_iswctype (int ch, re_wctype_t cc); |