summaryrefslogtreecommitdiff
path: root/src/regex-emacs.h
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2023-05-08 18:38:33 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2023-05-09 13:17:24 +0200
commit56468b52b2355a00c1dff2137c54136dbb031922 (patch)
tree460e18c342a0aa0ecb1f362ae351901b0dba5b45 /src/regex-emacs.h
parente9258a882a9b54f2992ae8ffd73e3da6bb3c4556 (diff)
downloademacs-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.h3
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);