summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2008-02-15 16:46:50 -0700
committerEric Blake <ebb9@byu.net>2008-02-15 16:46:50 -0700
commit7f0b47b96e8872513aae3a4e3819aef6d799e6bd (patch)
tree23d98f154586b65e83c3684eed79fa4b27a1005e
parente3dce8bbfdf9b917089814b081c80fb40958e1a9 (diff)
downloadm4-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--ChangeLog4
-rw-r--r--modules/gnu.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f50ac37a..0e3c93ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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