summaryrefslogtreecommitdiff
path: root/intrpvar.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-10-11 21:49:31 -0600
committerKarl Williamson <public@khwilliamson.com>2012-10-14 09:03:37 -0600
commit9d53c4576e551530162e7cd79ab72ed81b1e1a0f (patch)
treeee325930d7e69d86ff1ce9c69efc671fc1d3776b /intrpvar.h
parent9ffebac4d942e0e3785b33375ecf7c9fba8711f7 (diff)
downloadperl-9d53c4576e551530162e7cd79ab72ed81b1e1a0f.tar.gz
PATCH: [perl #89774] multi-char fold + its fold in char class
The design for handling characters that fold to multiple characters when the former are encountered in a bracketed character class is defective. The ticket reads, "If a bracketed character class includes a character that has a multi-char fold, and it also includes the first character of that fold, the multi-char fold will never be matched; just the first character of the fold.". Thus, in the class /[\0-\xff]/i, \xDF will never be matched, because its fold is 'ss', the first character of which, 's', is also in the class. The reason the design is defective is that it doesn't allow for backtracking and trying the other options. This commit solves this by effectively rewriting the above to be / (?: \xdf | [\0-\xde\xe0-\xff] ) /xi. And so the backtracking gets handled automatcially by the regex engine.
Diffstat (limited to 'intrpvar.h')
-rw-r--r--intrpvar.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/intrpvar.h b/intrpvar.h
index 41d9dbbbd5..3978dc1c5d 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -609,6 +609,7 @@ PERLVAR(I, XPosixXDigit, SV *)
PERLVAR(I, VertSpace, SV *)
PERLVAR(I, NonL1NonFinalFold, SV *)
+PERLVAR(I, HasMultiCharFold, SV *)
/* utf8 character class swashes */
PERLVAR(I, utf8_alnum, SV *)