[glib] Stop using deprecated g_unicode_canonical_decomposition()
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Stop using deprecated g_unicode_canonical_decomposition()
- Date: Wed, 20 Jul 2011 17:43:11 +0000 (UTC)
commit 4e213f385b45d8ce5d2fdb612d3706e214a7b368
Author: Vincent Untz <vuntz gnome org>
Date: Wed Jul 20 09:22:12 2011 +0200
Stop using deprecated g_unicode_canonical_decomposition()
https://bugzilla.gnome.org/show_bug.cgi?id=654948
glib/guniprop.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/glib/guniprop.c b/glib/guniprop.c
index 923478d..ceec0c6 100644
--- a/glib/guniprop.c
+++ b/glib/guniprop.c
@@ -855,15 +855,14 @@ real_toupper (const gchar *str,
* which could simplify this considerably.
*/
gsize decomp_len, i;
- gunichar *decomp;
+ gunichar decomp[4];
- decomp = g_unicode_canonical_decomposition (c, &decomp_len);
+ decomp_len = g_unichar_fully_decompose (c, FALSE, decomp, 4);
for (i=0; i < decomp_len; i++)
{
if (decomp[i] != 0x307 /* COMBINING DOT ABOVE */)
len += g_unichar_to_utf8 (g_unichar_toupper (decomp[i]), out_buffer ? out_buffer + len : NULL);
}
- g_free (decomp);
len += output_marks (&p, out_buffer ? out_buffer + len : NULL, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]