summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-01-23 11:57:14 -0700
committerKarl Williamson <khw@cpan.org>2015-01-23 21:54:42 -0700
commit7aa20b428680dffac746f9c0947535a222940bda (patch)
tree2ab4c75b0995d00959a117c060755ad8c72d18a0 /regcomp.c
parentf59fa626ecf8377ec531b277e5bd1c0f5958916d (diff)
downloadperl-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.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/regcomp.c b/regcomp.c
index d7c52b3188..1bce77ae92 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -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 */