diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-05-08 09:59:13 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-05-18 21:56:18 -0600 |
commit | fbebf34e35d51a2b213ac62fcb4377eda8df2112 (patch) | |
tree | 9d6abe448d67572a71f9c36d841b264fc4720884 /regcomp.c | |
parent | 2d42416a02614605eeb3a0729d0e8ba1d00df028 (diff) | |
download | perl-fbebf34e35d51a2b213ac62fcb4377eda8df2112.tar.gz |
/iaa doesn't work when the result is trie'd
It turns out that caseless tries currently only work on UTF-8 EXACTFU
nodes. The code attempted to test that by using UNI_SEMANTICS, but that
doesn't actually work; what is important is the semantics of the current
node.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -3048,20 +3048,17 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, } } else { /* - Currently we do not believe that the trie logic can - handle case insensitive matching properly when the - pattern is not unicode (thus forcing unicode semantics). + Currently the trie logic handles case insensitive matching properly only + when the pattern is UTF-8 and the node is EXACTFU (thus forcing unicode + semantics). If/when this is fixed the following define can be swapped in below to fully enable trie logic. - XXX It may work if not UTF and/or /a (AT_LEAST_UNI_SEMANTICS) but perhaps - not /aa - #define TRIE_TYPE_IS_SAFE 1 */ -#define TRIE_TYPE_IS_SAFE ((UTF && UNI_SEMANTICS) || optype==EXACT) +#define TRIE_TYPE_IS_SAFE ((UTF && optype == EXACTFU) || optype==EXACT) if ( last && TRIE_TYPE_IS_SAFE ) { make_trie( pRExC_state, |