diff options
author | Karl Williamson <khw@cpan.org> | 2015-01-23 11:57:14 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-01-23 21:54:42 -0700 |
commit | 7aa20b428680dffac746f9c0947535a222940bda (patch) | |
tree | 2ab4c75b0995d00959a117c060755ad8c72d18a0 /regcomp.c | |
parent | f59fa626ecf8377ec531b277e5bd1c0f5958916d (diff) | |
download | perl-7aa20b428680dffac746f9c0947535a222940bda.tar.gz |
regcomp.c: Another minor optimization
The [:cased:] internal class now handles [:upper:] and/or [:lower:]
under /i matching. This code skipped possible optimizations because it
didn't think to use this.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -14918,19 +14918,13 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, op = POSIXU; goto join_posix; - case ANYOF_NCASED: + /* The following change to CASED under /i */ case ANYOF_LOWER: case ANYOF_NLOWER: case ANYOF_UPPER: case ANYOF_NUPPER: - /* under /a could be alpha */ if (FOLD) { - if (ASCII_RESTRICTED) { - namedclass = ANYOF_ALPHA + (namedclass % 2); - } - else if (! LOC) { - break; - } + namedclass = ANYOF_CASED + (namedclass % 2); } /* FALLTHROUGH */ |