diff options
author | Karl Williamson <public@khwilliamson.com> | 2010-12-15 16:33:02 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2010-12-15 18:16:05 -0700 |
commit | 1e6ade674296a6205f357980325166c942b708fd (patch) | |
tree | 3798b89ab7413ad0c2aa2f35050d035de8e48c3c /regcomp.c | |
parent | 62ced8488642c3b92dea02499d2443b513c5c479 (diff) | |
download | perl-1e6ade674296a6205f357980325166c942b708fd.tar.gz |
regcomp.c: More work on ANYOF_CLASS
I overlooked two cases in a previous commit where it would be advisable
to make changes in case the ANYOF_CLASS bit needs to be combined with
ANYOF_LOCALE.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -763,8 +763,9 @@ S_cl_and(struct regnode_charclass_class *cl, PERL_ARGS_ASSERT_CL_AND; assert(and_with->type == ANYOF); - if (!(and_with->flags & ANYOF_CLASS) - && !(cl->flags & ANYOF_CLASS) + + if (!(ANYOF_CLASS_TEST_ANY_SET(and_with)) + && !(ANYOF_CLASS_TEST_ANY_SET(cl)) && (and_with->flags & ANYOF_LOCALE) == (cl->flags & ANYOF_LOCALE) && !(and_with->flags & ANYOF_FOLD) && !(cl->flags & ANYOF_FOLD)) { @@ -837,7 +838,7 @@ S_cl_or(const RExC_state_t *pRExC_state, struct regnode_charclass_class *cl, con /* OR char bitmap and class bitmap separately */ for (i = 0; i < ANYOF_BITMAP_SIZE; i++) cl->bitmap[i] |= or_with->bitmap[i]; - if (or_with->flags & ANYOF_CLASS) { + if (ANYOF_CLASS_TEST_ANY_SET(or_with)) { for (i = 0; i < ANYOF_CLASSBITMAP_SIZE; i++) cl->classflags[i] |= or_with->classflags[i]; cl->flags |= ANYOF_CLASS; |