From 613b489b6be0b4e819b42fad66301ac0fe591930 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 19 Jul 2007 13:46:05 +0000 Subject: [PATCH] Make g_unichar_combining_class() public. (#453998) 2007-07-19 Behdad Esfahbod * glib/glib.symbols: * glib/gunicode.h: * glib/gunicodeprivate.h: * glib/gunidecomp.c (g_unichar_combining_class): * glib/guniprop.c (has_more_above): Make g_unichar_combining_class() public. (#453998) svn path=/trunk/; revision=5644 --- ChangeLog | 9 +++++++++ docs/reference/ChangeLog | 4 ++++ docs/reference/glib/glib-sections.txt | 1 + glib/glib.symbols | 1 + glib/gunicode.h | 3 +++ glib/gunicodeprivate.h | 1 - glib/gunidecomp.c | 12 +++++++++++- glib/guniprop.c | 2 +- 8 files changed, 30 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 837d14dd..dadc4633 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-07-19 Behdad Esfahbod + + * glib/glib.symbols: + * glib/gunicode.h: + * glib/gunicodeprivate.h: + * glib/gunidecomp.c (g_unichar_combining_class): + * glib/guniprop.c (has_more_above): + Make g_unichar_combining_class() public. (#453998) + Fri Jul 13 01:01:46 2007 Tim Janik * glib/gthread.[hc]: more atomic ops pointer cast fixes. this time it'll diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 1dc958a5..0ece3eba 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,7 @@ +2007-07-19 Behdad Esfahbod + + * glib/glib-sections.txt: + 2007-07-12 Matthias Clasen * === Released 2.13.7 === diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt index 9b611f5e..7f75ad68 100644 --- a/docs/reference/glib/glib-sections.txt +++ b/docs/reference/glib/glib-sections.txt @@ -2420,6 +2420,7 @@ GUnicodeType g_unichar_type GUnicodeBreakType g_unichar_break_type +g_unichar_combining_class g_unicode_canonical_ordering g_unicode_canonical_decomposition g_unichar_get_mirror_char diff --git a/glib/glib.symbols b/glib/glib.symbols index 5ab58539..f54b992e 100644 --- a/glib/glib.symbols +++ b/glib/glib.symbols @@ -1291,6 +1291,7 @@ g_utf8_collate_key_for_filename G_GNUC_MALLOC #if IN_FILE(__G_UNIDECOMP_C__) g_unicode_canonical_decomposition G_GNUC_MALLOC g_unicode_canonical_ordering +g_unicode_combining_class g_utf8_normalize #endif #endif diff --git a/glib/gunicode.h b/glib/gunicode.h index 47478d05..41157bd8 100644 --- a/glib/gunicode.h +++ b/glib/gunicode.h @@ -236,6 +236,9 @@ GUnicodeType g_unichar_type (gunichar c) G_GNUC_CONST; /* Return the line break property for a given character */ GUnicodeBreakType g_unichar_break_type (gunichar c) G_GNUC_CONST; +/* Returns the combining class for a given character */ +gint g_unichar_combining_class (gunichar uc); G_GNUC_CONST; + /* Compute canonical ordering of a string in-place. This rearranges decomposed characters in the string according to their combining diff --git a/glib/gunicodeprivate.h b/glib/gunicodeprivate.h index 01aa5cba..70539d4f 100644 --- a/glib/gunicodeprivate.h +++ b/glib/gunicodeprivate.h @@ -29,7 +29,6 @@ G_GNUC_INTERNAL gunichar *_g_utf8_normalize_wc (const gchar *str, gssize max_len, GNormalizeMode mode); -G_GNUC_INTERNAL gint _g_unichar_combining_class (gunichar uc); G_END_DECLS diff --git a/glib/gunidecomp.c b/glib/gunidecomp.c index 21fd7c64..713742b8 100644 --- a/glib/gunidecomp.c +++ b/glib/gunidecomp.c @@ -47,8 +47,18 @@ ? CC_PART2 (((Char) - 0xe0000) >> 8, (Char) & 0xff) \ : 0)) +/** + * g_unichar_combining_class: + * @c: a Unicode character + * + * Determines the canonical combining class of a Unicode character. + * + * Return value: the combining class of the character. + * + * Since: 2.14 + **/ gint -_g_unichar_combining_class (gunichar uc) +g_unichar_combining_class (gunichar uc) { return COMBINING_CLASS (uc); } diff --git a/glib/guniprop.c b/glib/guniprop.c index c66a02c8..5eb0f13c 100644 --- a/glib/guniprop.c +++ b/glib/guniprop.c @@ -970,7 +970,7 @@ has_more_above (const gchar *str) while (*p) { - combining_class = _g_unichar_combining_class (g_utf8_get_char (p)); + combining_class = g_unichar_combining_class (g_utf8_get_char (p)); if (combining_class == 230) return TRUE; else if (combining_class == 0) -- 2.34.1