]> git.notmuchmail.org Git - notmuch/commitdiff
cli: Guard deprecated g_type_init calls
authorTomi Ollila <tomi.ollila@iki.fi>
Fri, 7 Jun 2013 18:41:13 +0000 (21:41 +0300)
committerDavid Bremner <bremner@debian.org>
Sat, 8 Jun 2013 23:42:33 +0000 (20:42 -0300)
g_type_init was deprecated in GLib 2.35.1.  In order to compile
cleanly, guard these with a suitable #if.

(commit msg from https://bugs.freedesktop.org/attachment.cgi?id=73774 )

lib/database.cc
notmuch.c

index 52ed618b81a6e3815b45d89c9e486d871d508e91..5cc076587a88785a5801eafcc56df2abef997d20 100644 (file)
@@ -649,7 +649,9 @@ notmuch_database_open (const char *path,
     }
 
     /* Initialize the GLib type system and threads */
+#if !GLIB_CHECK_VERSION(2, 35, 1)
     g_type_init ();
+#endif
 
     /* Initialize gmime */
     if (! initialized) {
index 99ddd6d080fb6a23068ee904b2c6c0f23832da3b..45a73ce07f2b31fb660871a17a74b50f13820aa0 100644 (file)
--- a/notmuch.c
+++ b/notmuch.c
@@ -291,7 +291,9 @@ main (int argc, char *argv[])
     local = talloc_new (NULL);
 
     g_mime_init (0);
+#if !GLIB_CHECK_VERSION(2, 35, 1)
     g_type_init ();
+#endif
 
     /* Globally default to the current output format version. */
     notmuch_format_version = NOTMUCH_FORMAT_CUR;