diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2012-10-27 12:18:53 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2012-10-27 12:18:53 +0100 |
commit | 64fe683c440d7ec7140fd27f53fbaf54da37b249 (patch) | |
tree | c9217804cc10287d4de2c7601214b89b207f0678 /json-glib/tests/serialize-complex.c | |
parent | f50f32dcfdecd552ca353731faa0fde099569c28 (diff) | |
download | json-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/serialize-complex.c')
-rw-r--r-- | json-glib/tests/serialize-complex.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/json-glib/tests/serialize-complex.c b/json-glib/tests/serialize-complex.c index 4594fdb..7b26da5 100644 --- a/json-glib/tests/serialize-complex.c +++ b/json-glib/tests/serialize-complex.c @@ -301,7 +301,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 ("/serialize/gobject-boxed", test_serialize); |