[libepc] Remove use of deprecated g_type_init().



commit 6cd02f4d0f4d812d697a405a7a29c2b75eba0773
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Oct 28 12:34:32 2015 +0100

    Remove use of deprecated g_type_init().

 configure.ac                              |    4 ++--
 examples/list-resources.c                 |    2 --
 examples/lookup-resource.c                |    2 --
 examples/service-browser.c                |    4 ----
 examples/simple-publisher.c               |    3 ---
 tests/test-consumer-by-info.c             |    1 -
 tests/test-consumer-by-name.c             |    1 -
 tests/test-dispatcher-local-collision.c   |    2 --
 tests/test-dispatcher-multiple-services.c |    2 --
 tests/test-dispatcher-rename.c            |    2 --
 tests/test-dispatcher-reset.c             |    2 --
 tests/test-dispatcher-simple-service.c    |    2 --
 tests/test-dispatcher-subtypes.c          |    2 --
 tests/test-dispatcher-unique.c            |    1 -
 tests/test-publisher-bookmarks.c          |    2 --
 tests/test-publisher-change-name.c        |    2 --
 tests/test-publisher-libsoup-494128.c     |    2 --
 tests/test-publisher-unique.c             |    1 -
 18 files changed, 2 insertions(+), 35 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a50d411..3f72cfc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,8 +72,8 @@ PKG_CHECK_EXISTS([$GIO_REQUIREMENT],
 PKG_CHECK_MODULES(AVAHI_UI,  [avahi-ui-gtk3     >= 0.6])
 PKG_CHECK_MODULES(LIBEPC,    [avahi-client >= 0.6
                               avahi-glib   >= 0.6
-                              glib-2.0     >= 2.32
-                              gthread-2.0  >= 2.32
+                              glib-2.0     >= 2.36
+                              gthread-2.0  >= 2.36
                               gmodule-2.0  >= 2.0
                               gobject-2.0  >= 2.4
                               gnutls       >= 1.4
diff --git a/examples/list-resources.c b/examples/list-resources.c
index 996e89f..a72716f 100644
--- a/examples/list-resources.c
+++ b/examples/list-resources.c
@@ -64,8 +64,6 @@ main (int   argc,
 
   /* Initialize the toolkit. */
 
-  g_type_init ();
-
   /* Parse command line options. */
 
   options = g_option_context_new (_("[PATTERNS...] - list Easy Publisher resources"));
diff --git a/examples/lookup-resource.c b/examples/lookup-resource.c
index e27bb98..22d7ff3 100644
--- a/examples/lookup-resource.c
+++ b/examples/lookup-resource.c
@@ -67,8 +67,6 @@ main (int   argc,
 
   /* Initialize the toolkit. */
 
-  g_type_init ();
-
   /* Parse command line options. */
 
   options = g_option_context_new (_("[KEYS...] - looks up Easy Publisher resources"));
diff --git a/examples/service-browser.c b/examples/service-browser.c
index 73c0cbd..fd1a3f9 100644
--- a/examples/service-browser.c
+++ b/examples/service-browser.c
@@ -49,10 +49,6 @@ main (int   argc,
       { NULL, 0, 0, 0, NULL, NULL, NULL }
     };
 
-  /* Initialize the toolkit. */
-
-  g_type_init ();
-
   /* Parse command line options. */
 
   options = g_option_context_new (NULL);
diff --git a/examples/simple-publisher.c b/examples/simple-publisher.c
index 4e406e7..9ac301b 100644
--- a/examples/simple-publisher.c
+++ b/examples/simple-publisher.c
@@ -103,10 +103,7 @@ main (int   argc,
       { NULL, 0, 0, 0, NULL, NULL, NULL }
     };
 
-  /* Initialize the toolkit. */
-
   setlocale (LC_ALL, "");
-  g_type_init ();
 
   /* Parse command line options. */
 
diff --git a/tests/test-consumer-by-info.c b/tests/test-consumer-by-info.c
index 9258bb1..4299ee8 100644
--- a/tests/test-consumer-by-info.c
+++ b/tests/test-consumer-by-info.c
@@ -85,7 +85,6 @@ main (void)
   gint result = 1;
 
   g_set_prgname (__FILE__);
-  g_type_init ();
 
   if (!epc_test_init (5))
     goto out;
diff --git a/tests/test-consumer-by-name.c b/tests/test-consumer-by-name.c
index b7eec08..947d0bb 100644
--- a/tests/test-consumer-by-name.c
+++ b/tests/test-consumer-by-name.c
@@ -35,7 +35,6 @@ main (void)
   gint result = 1;
 
   g_set_prgname (__FILE__);
-  g_type_init ();
 
   publisher = epc_publisher_new (NULL, NULL, NULL);
   epc_test_goto_if_fail (EPC_IS_PUBLISHER (publisher), out);
diff --git a/tests/test-dispatcher-local-collision.c b/tests/test-dispatcher-local-collision.c
index 4e52b7b..d30e044 100644
--- a/tests/test-dispatcher-local-collision.c
+++ b/tests/test-dispatcher-local-collision.c
@@ -61,8 +61,6 @@ main (void)
   int result = EPC_TEST_MASK_ALL;
   GError *error = NULL;
 
-  g_type_init ();
-
   test_type = g_strdup_printf ("_test-%08x._tcp", g_random_int ());
   preferred_name = g_strdup_printf ("%s: %08x", __FILE__, g_random_int ());
   alternative_name = avahi_alternative_service_name (preferred_name);
diff --git a/tests/test-dispatcher-multiple-services.c b/tests/test-dispatcher-multiple-services.c
index 6d58078..e69b4fb 100644
--- a/tests/test-dispatcher-multiple-services.c
+++ b/tests/test-dispatcher-multiple-services.c
@@ -59,8 +59,6 @@ main (void)
   GError *error = NULL;
   unsigned i;
 
-  g_type_init ();
-
   test_name = g_strdup_printf ("%s: %08x", __FILE__, hash);
 
   if (!epc_test_init (7))
diff --git a/tests/test-dispatcher-rename.c b/tests/test-dispatcher-rename.c
index 2bba67d..7728a1b 100644
--- a/tests/test-dispatcher-rename.c
+++ b/tests/test-dispatcher-rename.c
@@ -86,8 +86,6 @@ main (void)
   gint result = EPC_TEST_MASK_ALL;
   GError *error = NULL;
 
-  g_type_init ();
-
   test_type = g_strdup_printf ("_test-%08x._tcp", g_random_int ());
   first_name = g_strdup_printf ("%s: %08x-1", __FILE__, g_random_int ());
   second_name = g_strdup_printf ("%s: %08x-2", __FILE__, g_random_int ());
diff --git a/tests/test-dispatcher-reset.c b/tests/test-dispatcher-reset.c
index b60ee9f..50b4769 100644
--- a/tests/test-dispatcher-reset.c
+++ b/tests/test-dispatcher-reset.c
@@ -61,8 +61,6 @@ main (void)
   gint result = EPC_TEST_MASK_ALL;
   GError *error = NULL;
 
-  g_type_init ();
-
   test_name = g_strdup_printf ("%s: %08x", __FILE__, g_random_int ());
   test_type = g_strdup_printf ("_test-%08x._tcp", g_random_int ());
 
diff --git a/tests/test-dispatcher-simple-service.c b/tests/test-dispatcher-simple-service.c
index 31ae3c2..9757898 100644
--- a/tests/test-dispatcher-simple-service.c
+++ b/tests/test-dispatcher-simple-service.c
@@ -61,8 +61,6 @@ main (void)
   gint hash = g_random_int ();
   GError *error = NULL;
 
-  g_type_init ();
-
   test_name = g_strdup_printf ("%s: %08x", __FILE__, hash);
   test_type = g_strdup_printf ("_test-%08x._tcp", g_random_int ());
 
diff --git a/tests/test-dispatcher-subtypes.c b/tests/test-dispatcher-subtypes.c
index 572e4c8..a0d94eb 100644
--- a/tests/test-dispatcher-subtypes.c
+++ b/tests/test-dispatcher-subtypes.c
@@ -71,8 +71,6 @@ main (void)
   GError *error = NULL;
   unsigned i;
 
-  g_type_init ();
-
   test_name = g_strdup_printf ("%s: %08x", __FILE__, hash);
 
   if (!epc_test_init (7))
diff --git a/tests/test-dispatcher-unique.c b/tests/test-dispatcher-unique.c
index ff2e42d..e458f4c 100644
--- a/tests/test-dispatcher-unique.c
+++ b/tests/test-dispatcher-unique.c
@@ -85,7 +85,6 @@ main (void)
   gint result = 1;
 
   g_set_prgname (__FILE__);
-  g_type_init ();
 
   test_cookie1 = g_strdup_printf ("%08x-%08x-1", g_random_int (), g_random_int ());
   test_cookie2 = g_strdup_printf ("%08x-%08x-2", g_random_int (), g_random_int ());
diff --git a/tests/test-publisher-bookmarks.c b/tests/test-publisher-bookmarks.c
index 9c4d8ce..fd37c49 100644
--- a/tests/test-publisher-bookmarks.c
+++ b/tests/test-publisher-bookmarks.c
@@ -74,8 +74,6 @@ main (int   argc G_GNUC_UNUSED,
   g_set_prgname (prgname);
   g_free (prgname);
 
-  g_type_init ();
-
   hash = g_random_int ();
   first_name = g_strdup_printf ("%s-%08x-1", g_get_prgname (), hash);
   second_name = g_strdup_printf ("%s-%08x-2", g_get_prgname (), hash);
diff --git a/tests/test-publisher-change-name.c b/tests/test-publisher-change-name.c
index 22de352..422d876 100644
--- a/tests/test-publisher-change-name.c
+++ b/tests/test-publisher-change-name.c
@@ -69,8 +69,6 @@ main (int   argc G_GNUC_UNUSED,
   g_set_prgname (prgname);
   g_free (prgname);
 
-  g_type_init ();
-
   hash = g_random_int ();
   first_name = g_strdup_printf ("%s-%08x-1", g_get_prgname (), hash);
   second_name = g_strdup_printf ("%s-%08x-2", g_get_prgname (), hash);
diff --git a/tests/test-publisher-libsoup-494128.c b/tests/test-publisher-libsoup-494128.c
index bec4913..be1e206 100644
--- a/tests/test-publisher-libsoup-494128.c
+++ b/tests/test-publisher-libsoup-494128.c
@@ -54,8 +54,6 @@ main (int   argc G_GNUC_UNUSED,
   g_set_prgname (prgname);
   g_free (prgname);
 
-  g_type_init ();
-
   loop = g_main_loop_new (NULL, FALSE);
 
   g_print ("1) CREATE, DESTROY\n");
diff --git a/tests/test-publisher-unique.c b/tests/test-publisher-unique.c
index f8b56e3..2d14901 100644
--- a/tests/test-publisher-unique.c
+++ b/tests/test-publisher-unique.c
@@ -99,7 +99,6 @@ main (void)
   gint result = 1;
 
   g_set_prgname (__FILE__);
-  g_type_init ();
 
   test_cookie = g_strdup_printf ("%08x-%08x", g_random_int (), g_random_int ());
   test_name = g_strdup_printf ("%s %08x", __FILE__, g_random_int ());


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