diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-03-08 16:30:00 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-03-08 23:22:17 -0700 |
commit | f0c16e54b3b5efbb4380952c7ba5e8d7626d7cae (patch) | |
tree | 057038a339ef01d70856d2af7a35c09052daabcb /regcomp.c | |
parent | 1051e1c4d07fec1c36934f253d2baa8842339cbf (diff) | |
download | perl-f0c16e54b3b5efbb4380952c7ba5e8d7626d7cae.tar.gz |
regcomp.c: UTF /l should not use tries
It's unclear if tries will work under /l. I haven't seen any failures,
but there have been under /d. As a precaution, until more testing is
done, disable tries under anything but /u and UTF.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2939,10 +2939,13 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, 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 || optype==EXACT) +#define TRIE_TYPE_IS_SAFE ((UTF && UNI_SEMANTICS) || optype==EXACT) if ( last && TRIE_TYPE_IS_SAFE ) { make_trie( pRExC_state, |