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/array.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/array.c')
-rw-r--r-- | json-glib/tests/array.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/json-glib/tests/array.c b/json-glib/tests/array.c index f0aa195..115e84a 100644 --- a/json-glib/tests/array.c +++ b/json-glib/tests/array.c @@ -144,7 +144,10 @@ 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 ("/array/empty-array", test_empty_array); |