diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-10-15 18:39:02 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-05-25 00:40:58 +0000 |
commit | 3e754defc364a89b2136894399b3463976840156 (patch) | |
tree | c1e6a79107b1fc2b078a648d719f152489d98ed7 /pango/pango-context.c | |
parent | be0357359d975aa93d3683c5c5f4ea382b33ca5b (diff) | |
download | pango-3e754defc364a89b2136894399b3463976840156.tar.gz |
Replace PangoScript by GUnicodeScript
This commit replaces the PangoScript enum by a
typedef to GUnicodeScript, and preserves the old
enum values as defines.
This depends on adding an enum type for GUnicodeScript
in gobject.
Diffstat (limited to 'pango/pango-context.c')
-rw-r--r-- | pango/pango-context.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c index e21b490f..6f90e388 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; } @@ -1536,9 +1536,11 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS script_name); G_GNUC_END_IGNORE_DEPRECATIONS - g_object_set_data_full (G_OBJECT (fontmap), script_name, - GINT_TO_POINTER (1), NULL); + g_object_set_data_full (G_OBJECT (fontmap), script_name, + GINT_TO_POINTER (1), NULL); } + else + g_free (script_name); shape_engine = _pango_get_fallback_shaper (); font = NULL; |