diff options
author | Karl Williamson <khw@cpan.org> | 2014-05-11 18:19:40 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-07-05 15:06:02 -0600 |
commit | 65db5823e698ff3b319ee333af8fe3a61e4b0dec (patch) | |
tree | f2c0d5d35ebde5111021e8b25e85e02348c95d94 /regcomp.c | |
parent | 40d81d360e0b4d4dd4219bcff6bec1b9ef6baf55 (diff) | |
download | perl-65db5823e698ff3b319ee333af8fe3a61e4b0dec.tar.gz |
regcomp.c: Add assertion, remove case: statements
This routine should never be called unless the new assertion is true,
which removes the need for the removed cases in the switch.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 25 |
1 files changed, 6 insertions, 19 deletions
@@ -13197,9 +13197,10 @@ S_add_above_Latin1_folds(pTHX_ RExC_state_t *pRExC_state, const U8 cp, SV** invl * disk to find the possible matches. * * This should be called only for a Latin1-range code points, cp, which is - * known to be involved in a fold with other code points above Latin1. It - * would give false results if /aa has been specified. Multi-char folds - * are outside the scope of this, and must be handled specially. + * known to be involved in a simple fold with other code points above + * Latin1. It would give false results if /aa has been specified. + * Multi-char folds are outside the scope of this, and must be handled + * specially. * * XXX It would be better to generate these via regen, in case a new * version of the Unicode standard adds new mappings, though that is not @@ -13208,6 +13209,8 @@ S_add_above_Latin1_folds(pTHX_ RExC_state_t *pRExC_state, const U8 cp, SV** invl PERL_ARGS_ASSERT_ADD_ABOVE_LATIN1_FOLDS; + assert(HAS_NONLATIN1_SIMPLE_FOLD_CLOSURE(cp)); + switch (cp) { case 'k': case 'K': @@ -13233,22 +13236,6 @@ S_add_above_Latin1_folds(pTHX_ RExC_state_t *pRExC_state, const U8 cp, SV** invl case LATIN_SMALL_LETTER_SHARP_S: *invlist = add_cp_to_invlist(*invlist, LATIN_CAPITAL_LETTER_SHARP_S); break; - case 'F': case 'f': - case 'I': case 'i': - case 'L': case 'l': - case 'T': case 't': - case 'A': case 'a': - case 'H': case 'h': - case 'J': case 'j': - case 'N': case 'n': - case 'W': case 'w': - case 'Y': case 'y': - /* These all are targets of multi-character folds from code points - * that require UTF8 to express, so they can't match unless the - * target string is in UTF-8, so no action here is necessary, as - * regexec.c properly handles the general case for UTF-8 matching - * and multi-char folds */ - break; default: /* Use deprecated warning to increase the chances of this being * output */ |