diff options
author | Stefan Monnier <[email protected]> | 2006-10-03 13:19:18 +0000 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2006-10-03 13:19:18 +0000 |
commit | 6224b623fd39be87b33e0ff7dd582a3e8818e340 (patch) | |
tree | a5e02a35bd67b865fdf045ee778fbfe1602dbcc2 /src | |
parent | 1351dd3b9a76d557c6795b84f77fd738839bffbc (diff) |
(regex_compile): Set the new `used_syntax' bit.
Diffstat (limited to 'src')
-rw-r--r-- | src/regex.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/regex.c b/src/regex.c index 66e363e731..ae80ad0cee 100644 --- a/src/regex.c +++ b/src/regex.c @@ -2530,6 +2530,7 @@ regex_compile (pattern, size, syntax, bufp) bufp->syntax = syntax; bufp->fastmap_accurate = 0; bufp->not_bol = bufp->not_eol = 0; + bufp->used_syntax = 0; /* Set `used' to zero, so that if we return an error, the pattern printer (for debugging) will think there's no pattern. We reset it @@ -2942,6 +2943,14 @@ regex_compile (pattern, size, syntax, bufp) SET_LIST_BIT (translated); } + /* In most cases the matching rule for char classes + only uses the syntax table for multibyte chars, + so that the content of the syntax-table it is not + hardcoded in the range_table. SPACE and WORD are + the two exceptions. */ + if ((1 << cc) & ((1 << RECC_SPACE) | (1 << RECC_WORD))) + bufp->used_syntax = 1; + /* Repeat the loop. */ continue; } |