diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-10-11 21:49:31 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-10-14 09:03:37 -0600 |
commit | 9d53c4576e551530162e7cd79ab72ed81b1e1a0f (patch) | |
tree | ee325930d7e69d86ff1ce9c69efc671fc1d3776b /embedvar.h | |
parent | 9ffebac4d942e0e3785b33375ecf7c9fba8711f7 (diff) | |
download | perl-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 'embedvar.h')
-rw-r--r-- | embedvar.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/embedvar.h b/embedvar.h index 92bd2ae5d3..dc2583dd85 100644 --- a/embedvar.h +++ b/embedvar.h @@ -53,6 +53,7 @@ #define PL_DBtrace (vTHX->IDBtrace) #define PL_Dir (vTHX->IDir) #define PL_Env (vTHX->IEnv) +#define PL_HasMultiCharFold (vTHX->IHasMultiCharFold) #define PL_L1Cased (vTHX->IL1Cased) #define PL_L1PosixAlnum (vTHX->IL1PosixAlnum) #define PL_L1PosixAlpha (vTHX->IL1PosixAlpha) |