From ad0bff0e77747aa0f8ed3ded63adc50a799ef2ec Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 11 Nov 2011 13:05:19 -0700 Subject: [PATCH] regexec.c: Bypass unneeded step We don't have to convert from utf8 to code point to fold; instead can call the function that starts from utf8 --- regexec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regexec.c b/regexec.c index 56d1a5c..ced20bd 100644 --- a/regexec.c +++ b/regexec.c @@ -1200,8 +1200,8 @@ uvc, charid, foldlen, foldbuf, uniflags) STMT_START { \ uscan += len; \ len=0; \ } else { \ - uvc = utf8n_to_uvuni( (U8*)uc, UTF8_MAXLEN, &len, uniflags ); \ - uvc = to_uni_fold( uvc, foldbuf, &foldlen ); \ + uvc = to_utf8_fold( (U8 *) uc, foldbuf, &foldlen ); \ + len = UTF8SKIP(uc); \ foldlen -= UNISKIP( uvc ); \ uscan = foldbuf + UNISKIP( uvc ); \ } \ -- 2.7.4