* [PATCH v2 1/1] cli: Guard deprecated g_type_init calls
@ 2013-06-07 18:41 Tomi Ollila
2013-06-08 8:38 ` Jani Nikula
2013-06-09 0:10 ` David Bremner
0 siblings, 2 replies; 3+ messages in thread
From: Tomi Ollila @ 2013-06-07 18:41 UTC (permalink / raw)
To: notmuch; +Cc: tomi.ollila
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 )
---
v2 of id:1370614090-1715-1-git-send-email-tomi.ollila@iki.fi
database.cc was not caught by my naïve grep g_type_init **/*.c
(have to learn git grep !)
also added back one newline removed in v1
lib/database.cc | 2 ++
notmuch.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/lib/database.cc b/lib/database.cc
index 52ed618..5cc0765 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -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) {
diff --git a/notmuch.c b/notmuch.c
index 99ddd6d..45a73ce 100644
--- 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;
--
1.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] cli: Guard deprecated g_type_init calls
2013-06-07 18:41 [PATCH v2 1/1] cli: Guard deprecated g_type_init calls Tomi Ollila
@ 2013-06-08 8:38 ` Jani Nikula
2013-06-09 0:10 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2013-06-08 8:38 UTC (permalink / raw)
To: Tomi Ollila, notmuch; +Cc: tomi.ollila
On Fri, 07 Jun 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> g_type_init was deprecated in GLib 2.35.1. In order to compile
> cleanly, guard these with a suitable #if.
Looks good, tests pass.
Jani.
>
> (commit msg from https://bugs.freedesktop.org/attachment.cgi?id=73774 )
> ---
>
> v2 of id:1370614090-1715-1-git-send-email-tomi.ollila@iki.fi
>
> database.cc was not caught by my naïve grep g_type_init **/*.c
> (have to learn git grep !)
>
> also added back one newline removed in v1
>
> lib/database.cc | 2 ++
> notmuch.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/lib/database.cc b/lib/database.cc
> index 52ed618..5cc0765 100644
> --- a/lib/database.cc
> +++ b/lib/database.cc
> @@ -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) {
> diff --git a/notmuch.c b/notmuch.c
> index 99ddd6d..45a73ce 100644
> --- 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;
> --
> 1.8.0
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] cli: Guard deprecated g_type_init calls
2013-06-07 18:41 [PATCH v2 1/1] cli: Guard deprecated g_type_init calls Tomi Ollila
2013-06-08 8:38 ` Jani Nikula
@ 2013-06-09 0:10 ` David Bremner
1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2013-06-09 0:10 UTC (permalink / raw)
To: Tomi Ollila, notmuch; +Cc: tomi.ollila
Tomi Ollila <tomi.ollila@iki.fi> writes:
> 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 )
> ---
Pushed,
d
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-09 0:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-07 18:41 [PATCH v2 1/1] cli: Guard deprecated g_type_init calls Tomi Ollila
2013-06-08 8:38 ` Jani Nikula
2013-06-09 0:10 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).