# HG changeset patch # User Stefan Monnier # Date 1159881558 0 # Node ID 3501fcb2e68c600bb18f75b8648253b68ca6bb13 # Parent 636e0875704e9b38fa935a4ba1319c5b5e312e88 (regex_compile): Set the new `used_syntax' bit. diff -r 636e0875704e -r 3501fcb2e68c src/regex.c --- a/src/regex.c Tue Oct 03 13:18:24 2006 +0000 +++ b/src/regex.c Tue Oct 03 13:19:18 2006 +0000 @@ -2530,6 +2530,7 @@ 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 @@ 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; }