summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-03-08 16:30:00 -0700
committerKarl Williamson <public@khwilliamson.com>2011-03-08 23:22:17 -0700
commitf0c16e54b3b5efbb4380952c7ba5e8d7626d7cae (patch)
tree057038a339ef01d70856d2af7a35c09052daabcb /regcomp.c
parent1051e1c4d07fec1c36934f253d2baa8842339cbf (diff)
downloadperl-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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index 620b0264bd..be90fca0ff 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -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,