From: Jarkko Hietaniemi Date: Sun, 24 Feb 2002 19:49:01 +0000 (+0000) Subject: Use to_uni_fold(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2f3bf0116fb4a02e09f97f517a7e1ff497539a2d;p=p5sagit%2Fp5-mst-13.2.git Use to_uni_fold(). p4raw-id: //depot/perl@14855 --- diff --git a/regcomp.c b/regcomp.c index 2e8254e..4bfef22 100644 --- a/regcomp.c +++ b/regcomp.c @@ -4088,14 +4088,9 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state) else if (prevnatvalue == natvalue) { Perl_sv_catpvf(aTHX_ listsv, "%04"UVxf"\n", natvalue); if (FOLD) { - U8 tmpbuf [UTF8_MAXLEN+1]; U8 foldbuf[UTF8_MAXLEN_FOLD+1]; STRLEN foldlen; - UV f; - - uvchr_to_utf8(tmpbuf, natvalue); - to_utf8_fold(tmpbuf, foldbuf, &foldlen); - f = UNI_TO_NATIVE(utf8_to_uvchr(foldbuf, 0)); + UV f = to_uni_fold(natvalue, foldbuf, &foldlen); /* If folding and foldable and a single * character, insert also the folded version