summaryrefslogtreecommitdiff
path: root/src/regex-emacs.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-03-27 21:03:10 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-03-27 21:24:26 -0700
commit81795bb71394aac6d7f6f7fd2656b2eb79a39a4d (patch)
treeff9f813ebc27ba20ebd502412826d782d223b0f6 /src/regex-emacs.h
parenteac5f967ca700c5f47cf673cb4c06b07c4f42ac2 (diff)
downloademacs-81795bb71394aac6d7f6f7fd2656b2eb79a39a4d.tar.gz
Tweak re_registers allocation
* src/regex-emacs.c (re_match_2_internal): No need to allocate one extra trailing search register; Emacs does not use it. Avoid quadratic behavior on reallocation.
Diffstat (limited to 'src/regex-emacs.h')
-rw-r--r--src/regex-emacs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regex-emacs.h b/src/regex-emacs.h
index 95f743dc2fb..ddf14e0d9e1 100644
--- a/src/regex-emacs.h
+++ b/src/regex-emacs.h
@@ -98,7 +98,7 @@ struct re_pattern_buffer
bool_bf can_be_null : 1;
/* If REGS_UNALLOCATED, allocate space in the 'regs' structure
- for 'max (RE_NREGS, re_nsub + 1)' groups.
+ for at least (re_nsub + 1) groups.
If REGS_REALLOCATE, reallocate space if necessary.
If REGS_FIXED, use what's there. */
unsigned regs_allocated : 2;