[lasem/lasem-0-4] all: fix deprecation warnings related to g_type_init



commit 1d06a7c1e00d1052181a8a1a5c6bdd061fffde62
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Mon May 5 22:17:59 2014 +0200

    all: fix deprecation warnings related to g_type_init

 src/lasemrender.c |    2 ++
 tests/dom.c       |    2 ++
 tests/lsmtest.c   |    3 +++
 tests/str.c       |    2 ++
 tests/suite.c     |    2 ++
 5 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/lasemrender.c b/src/lasemrender.c
index d0accf1..ec9a41f 100644
--- a/src/lasemrender.c
+++ b/src/lasemrender.c
@@ -94,7 +94,9 @@ int main(int argc, char **argv)
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
        textdomain (GETTEXT_PACKAGE);
 
+#if !GLIB_CHECK_VERSION(2,36,0)
        g_type_init ();
+#endif
 
        context = g_option_context_new (NULL);
        g_option_context_add_main_entries (context, entries, NULL);
diff --git a/tests/dom.c b/tests/dom.c
index a33037e..05c8c96 100644
--- a/tests/dom.c
+++ b/tests/dom.c
@@ -162,7 +162,9 @@ main (int argc, char *argv[])
        g_test_add_func ("/dom/node-list", node_list_test);
        g_test_add_func ("/dom/insert-before", insert_before_test);
 
+#if !GLIB_CHECK_VERSION(2,36,0)
        g_type_init ();
+#endif
 
        result = g_test_run();
 
diff --git a/tests/lsmtest.c b/tests/lsmtest.c
index 8e64ff2..d9db7ac 100644
--- a/tests/lsmtest.c
+++ b/tests/lsmtest.c
@@ -530,7 +530,10 @@ main (int argc, char **argv)
        lasem_test_html ("<html xmlns=\"http://www.w3.org/1999/xhtml\";>\n");
        lasem_test_html ("<body>\n");
 
+#if !GLIB_CHECK_VERSION(2,36,0)
        g_type_init ();
+#endif
+
        context = g_option_context_new (NULL);
        g_option_context_add_main_entries (context, entries, NULL);
 
diff --git a/tests/str.c b/tests/str.c
index d954a00..b70cdd9 100644
--- a/tests/str.c
+++ b/tests/str.c
@@ -36,7 +36,9 @@ main (int argc, char *argv[])
 
        g_test_add_func ("/str/str-consolidate", str_consolidate_test);
 
+#if !GLIB_CHECK_VERSION(2,36,0)
        g_type_init ();
+#endif
 
        result = g_test_run();
 
diff --git a/tests/suite.c b/tests/suite.c
index 7ecd41e..b8b9af8 100644
--- a/tests/suite.c
+++ b/tests/suite.c
@@ -103,7 +103,9 @@ main (int argc, char *argv[])
        GSList *files;
        int result;
 
+#if !GLIB_CHECK_VERSION(2,36,0)
        g_type_init ();
+#endif
 
        g_test_init (&argc, &argv, NULL);
 


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