summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-01-07 20:19:49 -0500
committerMatthias Clasen <mclasen@redhat.com>2013-01-07 21:06:51 -0500
commit922c0d4ea0516419422b1d77b5b25176cc72f691 (patch)
treeafe1fae0073c21f2af8dc2e19c5d3904ba18a577 /pango
parent4dd5a5e18d4d3184ce4c97e0bcd9e97ebb267831 (diff)
downloadpango-922c0d4ea0516419422b1d77b5b25176cc72f691.tar.gz
Don't call g_type_init if GLib is new enough
g_type_init has been deprecated in GLib 2.35.x. Use a version check here to avoid depending on unstable GLib.
Diffstat (limited to 'pango')
-rw-r--r--pango/modules.c2
-rw-r--r--pango/pangoft2-fontmap.c2
-rw-r--r--pango/pangowin32-fontmap.c2
-rw-r--r--pango/pangoxft-fontmap.c2
-rw-r--r--pango/querymodules.c2
5 files changed, 10 insertions, 0 deletions
diff --git a/pango/modules.c b/pango/modules.c
index 24cdbf7d..ca8d4885 100644
--- a/pango/modules.c
+++ b/pango/modules.c
@@ -602,8 +602,10 @@ init_modules (void)
if (g_once_init_enter (&init))
{
+#if !GLIB_CHECK_VERSION (2, 35, 3)
/* Make sure that the type system is initialized */
g_type_init ();
+#endif
for (i = 0; _pango_included_lang_modules[i].list; i++)
pango_module_register (&_pango_included_lang_modules[i]);
diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c
index 996bbb1f..dbf4980f 100644
--- a/pango/pangoft2-fontmap.c
+++ b/pango/pangoft2-fontmap.c
@@ -132,8 +132,10 @@ pango_ft2_font_map_new (void)
PangoFT2FontMap *ft2fontmap;
FT_Error error;
+#if !GLIB_CHECK_VERSION (2, 35, 3)
/* Make sure that the type system is initialized */
g_type_init ();
+#endif
ft2fontmap = g_object_new (PANGO_TYPE_FT2_FONT_MAP, NULL);
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index ec5b482f..5dc2a826 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -737,8 +737,10 @@ _pango_win32_font_map_class_init (PangoWin32FontMapClass *class)
PangoFontMap *
pango_win32_font_map_for_display (void)
{
+#if !GLIB_CHECK_VERSION (2, 35, 3)
/* Make sure that the type system is initialized */
g_type_init ();
+#endif
if (g_once_init_enter ((gsize*)&default_fontmap))
g_once_init_leave((gsize*)&default_fontmap, (gsize)g_object_new (PANGO_TYPE_WIN32_FONT_MAP, NULL));
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c
index aa891c54..803dc186 100644
--- a/pango/pangoxft-fontmap.c
+++ b/pango/pangoxft-fontmap.c
@@ -222,8 +222,10 @@ pango_xft_get_font_map (Display *display,
if (fontmap)
return fontmap;
+#if !GLIB_CHECK_VERSION (2, 35, 3)
/* Make sure that the type system is initialized */
g_type_init ();
+#endif
xftfontmap = (PangoXftFontMap *)g_object_new (PANGO_TYPE_XFT_FONT_MAP, NULL);
diff --git a/pango/querymodules.c b/pango/querymodules.c
index 549003fb..0c86811e 100644
--- a/pango/querymodules.c
+++ b/pango/querymodules.c
@@ -238,7 +238,9 @@ main (int argc, char **argv)
g_option_context_free(context);
+#if !GLIB_CHECK_VERSION (2, 35, 3)
g_type_init ();
+#endif
contents = g_string_new ("");
g_string_append (contents,