[pango/deprecate-pango-script: 2/2] Stop using the PangoScript type



commit 8e7cd4d05b96b51fcdef4bef8caee5efe068d375
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 27 14:12:40 2019 +0000

    Stop using the PangoScript type
    
    We were using the enum nicks in on place.
    Use GUnicodeScript instead, since that is getting
    updated for newer Unicode versions.

 pango/pango-context.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pango/pango-context.c b/pango/pango-context.c
index e21b490f..6a1a81e2 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -1447,11 +1447,11 @@ string_from_script (PangoScript script)
   static GEnumClass *class = NULL; /* MT-safe */
   GEnumValue *value;
   if (g_once_init_enter (&class))
-    g_once_init_leave(&class, (gpointer)g_type_class_ref (PANGO_TYPE_SCRIPT));
+    g_once_init_leave(&class, (gpointer)g_type_class_ref (G_TYPE_UNICODE_SCRIPT));
 
   value = g_enum_get_value (class, script);
   if (!value)
-    return string_from_script (PANGO_SCRIPT_INVALID_CODE);
+    return string_from_script (G_UNICODE_SCRIPT_INVALID_CODE);
 
   return value->value_nick;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]