From: Karl Williamson Date: Sun, 27 Feb 2011 20:55:03 +0000 (-0700) Subject: regcomp.c: Convert old-style to inversion list X-Git-Tag: accepted/trunk/20130322.191538~5266 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d791ab2d32bd22ff8566e9d86204da48e96a040;p=platform%2Fupstream%2Fperl.git regcomp.c: Convert old-style to inversion list The code that handles a false range in a [character class] hadn't been converted to use inversion lists --- diff --git a/regcomp.c b/regcomp.c index c4673ec..a737ebe 100644 --- a/regcomp.c +++ b/regcomp.c @@ -9611,7 +9611,8 @@ parseit: } /* a bad range like a-\d, a-[:digit:]. The '-' is taken as a - * literal */ + * literal, as is the character that began the false range, i.e. + * the 'a' in the examples */ if (range) { if (!SIZE_ONLY) { const int w = @@ -9621,15 +9622,14 @@ parseit: "False [] range \"%*.*s\"", w, w, rangebegin); + stored += + set_regclass_bit(pRExC_state, ret, '-', &nonbitmap); if (prevvalue < 256) { stored += set_regclass_bit(pRExC_state, ret, (U8) prevvalue, &nonbitmap); - stored += - set_regclass_bit(pRExC_state, ret, '-', &nonbitmap); } else { - Perl_sv_catpvf(aTHX_ listsv, - "%04"UVxf"\n%04"UVxf"\n", (UV)prevvalue, (UV) '-'); + nonbitmap = add_cp_to_invlist(nonbitmap, prevvalue); } }