From: Chun-wei Fan Date: Fri, 16 Sep 2011 07:54:42 +0000 (+0800) Subject: break.c: Fix compilation against newer GLib versions X-Git-Tag: 1.29.5~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c820da4fa40e02bf64d27b0467a530d990c93358;p=platform%2Fupstream%2Fpango.git break.c: Fix compilation against newer GLib versions G_UNICODE_COMBINING_MARK was renamed as G_UNICODE_SPACING_MARK soon after the GLib 2.29.14 release, so fix that in break.c and pango-ot-info.c. To support GLib on and before 2.29.14, a convenience definition for G_UNICODE_SPACING_MARK is defined. --- diff --git a/pango/break.c b/pango/break.c index b17dc60..8acf3fa 100644 --- a/pango/break.c +++ b/pango/break.c @@ -30,6 +30,10 @@ #define PARAGRAPH_SEPARATOR 0x2029 #define PARAGRAPH_SEPARATOR_STRING "\xE2\x80\xA9" +#if (!GLIB_CHECK_VERSION (2,29,15)) +#define G_UNICODE_SPACING_MARK G_UNICODE_COMBINING_MARK +#endif + /* See http://www.unicode.org/unicode/reports/tr14/ if you hope * to understand the line breaking code. */ @@ -687,7 +691,7 @@ pango_default_break (const gchar *text, GB_type = GB_Extend; /* Other_Grapheme_Extend */ break; - case G_UNICODE_COMBINING_MARK: + case G_UNICODE_SPACING_MARK: GB_type = GB_SpacingMark; /* SpacingMark */ if (wc >= 0x0900) { @@ -796,7 +800,7 @@ pango_default_break (const gchar *text, break; case G_UNICODE_FORMAT: - case G_UNICODE_COMBINING_MARK: + case G_UNICODE_SPACING_MARK: case G_UNICODE_ENCLOSING_MARK: case G_UNICODE_NON_SPACING_MARK: WB_type = WB_ExtendFormat; /* Extend, Format */ @@ -1121,7 +1125,7 @@ pango_default_break (const gchar *text, /* Check for a word end */ switch ((int) type) { - case G_UNICODE_COMBINING_MARK: + case G_UNICODE_SPACING_MARK: case G_UNICODE_ENCLOSING_MARK: case G_UNICODE_NON_SPACING_MARK: case G_UNICODE_FORMAT: @@ -1636,7 +1640,7 @@ pango_default_break (const gchar *text, /* wc might not be a valid Unicode base character, but really all we * need to know is the last non-combining character */ - if (type != G_UNICODE_COMBINING_MARK && + if (type != G_UNICODE_SPACING_MARK && type != G_UNICODE_ENCLOSING_MARK && type != G_UNICODE_NON_SPACING_MARK) base_character = wc; diff --git a/pango/pango-ot-info.c b/pango/pango-ot-info.c index 7bc249b..e5d9c64 100644 --- a/pango/pango-ot-info.c +++ b/pango/pango-ot-info.c @@ -25,6 +25,10 @@ #include "pango-impl-utils.h" #include FT_TRUETYPE_TABLES_H +#if (!GLIB_CHECK_VERSION(2,29,15)) +#define G_UNICODE_SPACING_MARK G_UNICODE_COMBINING_MARK +#endif + static void pango_ot_info_finalize (GObject *object); static void synthesize_class_def (PangoOTInfo *info); @@ -183,7 +187,7 @@ get_glyph_class (gunichar charcode, switch ((int) g_unichar_type (charcode)) { - case G_UNICODE_COMBINING_MARK: + case G_UNICODE_SPACING_MARK: case G_UNICODE_ENCLOSING_MARK: case G_UNICODE_NON_SPACING_MARK: *class = HB_OT_LAYOUT_GLYPH_CLASS_MARK; /* Mark glyph (non-spacing combining glyph) */