From 43aac613f1c2a56aa672c36c157c9b8eb193ac25 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 17 Jul 2017 10:16:06 +0100 Subject: Conditionall call g_type_init() after a version check There's no need to call g_type_init() since GLib 2.36, so let's hide it when building against newer versions of GLib. --- tests/test-error.c | 2 ++ tests/test-replace.c | 2 ++ 2 files changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/test-error.c b/tests/test-error.c index b7b9662..afcb59b 100644 --- a/tests/test-error.c +++ b/tests/test-error.c @@ -29,7 +29,9 @@ main () { NotifyNotification *n; +#if !GLIB_CHECK_VERSION (2, 36, 0) g_type_init (); +#endif notify_init ("Error Handling"); diff --git a/tests/test-replace.c b/tests/test-replace.c index 56b13c5..ec7b5fc 100644 --- a/tests/test-replace.c +++ b/tests/test-replace.c @@ -28,7 +28,9 @@ main () GError *error; error = NULL; +#if !GLIB_CHECK_VERSION (2, 36, 0) g_type_init (); +#endif notify_init ("Replace Test"); -- cgit v1.2.1