diff options
author | Eric Blake <ebb9@byu.net> | 2008-02-15 16:46:50 -0700 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2008-02-15 16:46:50 -0700 |
commit | 7f0b47b96e8872513aae3a4e3819aef6d799e6bd (patch) | |
tree | 23d98f154586b65e83c3684eed79fa4b27a1005e | |
parent | e3dce8bbfdf9b917089814b081c80fb40958e1a9 (diff) | |
download | m4-7f0b47b96e8872513aae3a4e3819aef6d799e6bd.tar.gz |
* modules/gnu.c (regexp_compile): Use a fastmap for regex speed.
Signed-off-by: Eric Blake <ebb9@byu.net>
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | modules/gnu.c | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -1,3 +1,7 @@ +2008-02-15 Eric Blake <ebb9@byu.net> + + * modules/gnu.c (regexp_compile): Use a fastmap for regex speed. + 2008-02-13 Eric Blake <ebb9@byu.net> Fix texinfo grammar. diff --git a/modules/gnu.c b/modules/gnu.c index 10fb0acb..f3b7fb73 100644 --- a/modules/gnu.c +++ b/modules/gnu.c @@ -175,6 +175,8 @@ regexp_compile (m4 *context, const char *caller, const char *regexp, free (pat); return NULL; } + /* Use a fastmap for speed; it is freed by regfree. */ + pat->fastmap = xcharalloc (256); /* Now, find a victim slot. Decrease the count of all entries, then prime the count of the victim slot at REGEX_CACHE_SIZE. This |