diff options
author | Jeffrey Stedfast <fejj@gnome.org> | 2011-04-27 04:46:39 +0400 |
---|---|---|
committer | Jeffrey Stedfast <fejj@gnome.org> | 2011-04-27 04:46:39 +0400 |
commit | 71066e73bb956efb1a5228bb731324994a28d163 (patch) | |
tree | 97f2d8a09fbfa705cb1509cc5f4bcdf8603b42ca /eglib | |
parent | 1423512d76f816fd2c483cc228b5c9cc0c1f800d (diff) |
Optimize utf8_case_conv()
Seems like g_utf8_strdown/up expect valid utf8, so it
should be safe for us to use g_utf8_to_ucs4_fast().
Diffstat (limited to 'eglib')
-rw-r--r-- | eglib/src/gutf8.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/eglib/src/gutf8.c b/eglib/src/gutf8.c index 67b2cfe2fc7..511f42d3d51 100644 --- a/eglib/src/gutf8.c +++ b/eglib/src/gutf8.c @@ -36,7 +36,7 @@ utf8_case_conv (const gchar *str, gssize len, gboolean upper) glong i, ulen; gchar *utf8; - ustr = g_utf8_to_ucs4 (str, (glong) len, NULL, &ulen, NULL); + ustr = g_utf8_to_ucs4_fast (str, (glong) len, &ulen); for (i = 0; i < ulen; i++) ustr[i] = upper ? g_unichar_toupper (ustr[i]) : g_unichar_tolower (ustr[i]); utf8 = g_ucs4_to_utf8 (ustr, ulen, NULL, NULL, NULL); |