summaryrefslogtreecommitdiff
path: root/json-glib/tests/parser.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2012-10-27 12:18:53 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2012-10-27 12:18:53 +0100
commit64fe683c440d7ec7140fd27f53fbaf54da37b249 (patch)
treec9217804cc10287d4de2c7601214b89b207f0678 /json-glib/tests/parser.c
parentf50f32dcfdecd552ca353731faa0fde099569c28 (diff)
downloadjson-glib-64fe683c440d7ec7140fd27f53fbaf54da37b249.tar.gz
tests: Put g_type_init() under conditional compilation
Starting from GLib 2.36, g_type_init() is going to be deprecated (the type system will be initialized as soon as libgobject is paged in, using constructors). As I don't want to bump dependencies just for that, the call to g_type_init() should be placed under a compile-time version check, to keep the noise from compiler warnings down.
Diffstat (limited to 'json-glib/tests/parser.c')
-rw-r--r--json-glib/tests/parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/json-glib/tests/parser.c b/json-glib/tests/parser.c
index 3b1b049..dc64f75 100644
--- a/json-glib/tests/parser.c
+++ b/json-glib/tests/parser.c
@@ -727,7 +727,9 @@ int
main (int argc,
char *argv[])
{
+#if !GLIB_CHECK_VERSION (2, 35, 1)
g_type_init ();
+#endif
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/parser/empty-string", test_empty);