[next] telepathy-gabble: Require GLib 2.40, and remove deprecated and useless g_type_init() calls

Simon McVittie smcv at kemper.freedesktop.org
Thu Apr 10 07:02:18 PDT 2014


Module: telepathy-gabble
Branch: next
Commit: 044b8126583622bb8cbc42530087a44fb3f98ba8
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=044b8126583622bb8cbc42530087a44fb3f98ba8

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Wed Apr  9 19:21:46 2014 +0100

Require GLib 2.40, and remove deprecated and useless g_type_init() calls

---

 configure.ac                  |    8 ++++----
 src/gabble.c                  |    1 -
 src/write-mgr-file.c          |    1 -
 tests/test-gabble-idle-weak.c |    1 -
 tests/test-handles.c          |    2 --
 tests/test-parse-message.c    |    1 -
 tests/test-presence.c         |    1 -
 tests/tp-error-from-wocky.c   |    2 --
 8 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index c43f9ce..8ea51e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -221,11 +221,11 @@ AM_CONDITIONAL([ENABLE_GTK_DOC], [test "x$enable_gtk_doc" = xyes])
 
 dnl Check for Glib
 PKG_CHECK_MODULES(GLIB,
-    [glib-2.0 >= 2.32, gobject-2.0, gthread-2.0, gio-2.0])
-PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.32])
+    [glib-2.0 >= 2.40, gobject-2.0, gthread-2.0, gio-2.0])
+PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.40])
 
-AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_32, [Ignore post 2.32 deprecations])
-AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_32, [Prevent post 2.32 APIs])
+AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_40, [Ignore post 2.40 deprecations])
+AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_40, [Prevent post 2.40 APIs])
 
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
diff --git a/src/gabble.c b/src/gabble.c
index 64c6bf4..f8f6b5d 100644
--- a/src/gabble.c
+++ b/src/gabble.c
@@ -107,7 +107,6 @@ gabble_init (void)
   if (!dbus_threads_init_default ())
     g_error ("Unable to initialize libdbus thread-safety (out of memory?)");
 
-  g_type_init ();
   wocky_init ();
 }
 
diff --git a/src/write-mgr-file.c b/src/write-mgr-file.c
index a947a53..e8e863b 100644
--- a/src/write-mgr-file.c
+++ b/src/write-mgr-file.c
@@ -424,7 +424,6 @@ main (void)
   gchar *s;
   GSList *protocols = NULL;
 
-  g_type_init ();
   dbus_g_type_specialized_init ();
 
   protocols = g_slist_prepend (protocols,
diff --git a/tests/test-gabble-idle-weak.c b/tests/test-gabble-idle-weak.c
index 37f81d5..74c8861 100644
--- a/tests/test-gabble-idle-weak.c
+++ b/tests/test-gabble-idle-weak.c
@@ -70,7 +70,6 @@ test_2 (void)
 int
 main (void)
 {
-  g_type_init ();
   test_1();
   test_2();
   return 0;
diff --git a/tests/test-handles.c b/tests/test-handles.c
index 2a873d5..ea56926 100644
--- a/tests/test-handles.c
+++ b/tests/test-handles.c
@@ -73,8 +73,6 @@ test_handles (guint entity_type)
 
 int main (int argc, char **argv)
 {
-  g_type_init ();
-
   test_handles (TP_ENTITY_TYPE_CONTACT);
   test_handles (TP_ENTITY_TYPE_ROOM);
   return 0;
diff --git a/tests/test-parse-message.c b/tests/test-parse-message.c
index e73ec3d..1f708d2 100644
--- a/tests/test-parse-message.c
+++ b/tests/test-parse-message.c
@@ -286,7 +286,6 @@ main (
     int argc,
     char *argv[])
 {
-  g_type_init ();
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/parse-message/1", test1);
diff --git a/tests/test-presence.c b/tests/test-presence.c
index 8319cb2..cd4e796 100644
--- a/tests/test-presence.c
+++ b/tests/test-presence.c
@@ -208,7 +208,6 @@ int main (int argc, char **argv)
 {
   int ret;
 
-  g_type_init ();
   gabble_capabilities_init (NULL);
   gabble_debug_set_flags_from_env ();
 
diff --git a/tests/tp-error-from-wocky.c b/tests/tp-error-from-wocky.c
index 729af31..2abcdaf 100644
--- a/tests/tp-error-from-wocky.c
+++ b/tests/tp-error-from-wocky.c
@@ -40,8 +40,6 @@ test_remap (GQuark domain,
 int
 main (void)
 {
-  g_type_init ();
-
   test_remap (WOCKY_XMPP_ERROR, WOCKY_XMPP_ERROR_FORBIDDEN, "computer says no",
       TP_CONNECTION_STATUS_CONNECTED,
       TP_ERROR_PERMISSION_DENIED,



More information about the telepathy-commits mailing list