summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-02-18 10:39:35 -0700
committerKarl Williamson <public@khwilliamson.com>2012-02-18 10:39:35 -0700
commit8e2a5fb186365b988390508684b8d5a0435b96b3 (patch)
tree527964976bd18a4109f1f6bc2fbf81508d1d26a2
parentf0a21d7164bc84b2098009f5f533cf19b1351c6e (diff)
downloadperl-khw/trie.tar.gz
for Yveskhw/trie
-rw-r--r--regcomp.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/regcomp.c b/regcomp.c
index 95b64ccfd4..1382e864f9 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1380,7 +1380,10 @@ is the recommended Unicode-aware way of saying
#define TRIE_READ_CHAR STMT_START { \
wordlen++; \
- if ( UTF || flags == EXACTFU ) { \
+ if ( UTF) { \
+ uvc = utf8n_to_uvuni( (const U8*)uc, UTF8_MAXLEN, &len, uniflags);\
+ } \
+ else if (flags == EXACTFU || flags == EXACTFU_SS ) { \
if ( folder ) { \
if ( foldlen > 0 ) { \
uvc = utf8n_to_uvuni( scan, UTF8_MAXLEN, &len, uniflags ); \
@@ -1388,13 +1391,8 @@ is the recommended Unicode-aware way of saying
scan += len; \
len = 0; \
} else { \
- if (UTF) { \
- len = UTF8SKIP(uc); \
- uvc = to_utf8_fold( uc, foldbuf, &foldlen); \
- } else { \
- len = 1; \
- uvc = _to_fold_latin1((U32)*uc, foldbuf, &foldlen, 1); \
- } \
+ len = 1; \
+ uvc = _to_fold_latin1((U32)*uc, foldbuf, &foldlen, 1); \
foldlen -= UNISKIP( uvc ); \
scan = foldbuf + UNISKIP( uvc ); \
} \
@@ -3294,7 +3292,7 @@ Note that join_exact() assumes that the other types of EXACTFish nodes are not
used in tries, so that would have to be updated if this changed
*/
-#define TRIE_TYPE_IS_SAFE (optype == EXACTFU || optype==EXACT)
+#define TRIE_TYPE_IS_SAFE (optype == EXACTFU || optype==EXACT || optype == EXACTFU_NO_TRIE || optype == EXACTFU_SS)
if ( last && TRIE_TYPE_IS_SAFE ) {
make_trie( pRExC_state,