diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-02-18 10:39:35 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-02-18 10:39:35 -0700 |
commit | 8e2a5fb186365b988390508684b8d5a0435b96b3 (patch) | |
tree | 527964976bd18a4109f1f6bc2fbf81508d1d26a2 | |
parent | f0a21d7164bc84b2098009f5f533cf19b1351c6e (diff) | |
download | perl-khw/trie.tar.gz |
for Yveskhw/trie
-rw-r--r-- | regcomp.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -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, |