diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2016-08-29 10:11:40 -0300 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2016-08-29 10:11:40 -0300 |
commit | 5780c42b705a3d99dc4f4895470be092ba6c6f00 (patch) | |
tree | 63a2fd32340daa719b8c8445fd8595b196ebe9fe | |
parent | 082cb075b02d61494fa0507a4672ffc92ce8ee1c (diff) | |
download | meson-5780c42b705a3d99dc4f4895470be092ba6c6f00.zip meson-5780c42b705a3d99dc4f4895470be092ba6c6f00.tar.gz meson-5780c42b705a3d99dc4f4895470be092ba6c6f00.tar.bz2 |
tests: framworks: 7 gnome: Stop using g_autoptr
-rw-r--r-- | test cases/frameworks/7 gnome/gir/prog.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test cases/frameworks/7 gnome/gir/prog.c b/test cases/frameworks/7 gnome/gir/prog.c index 1116285..c855a6b 100644 --- a/test cases/frameworks/7 gnome/gir/prog.c +++ b/test cases/frameworks/7 gnome/gir/prog.c @@ -6,18 +6,26 @@ gint main (gint argc, gchar *argv[]) { - g_autoptr(GError) error = NULL; + GError * error = NULL; - g_autoptr(GOptionContext) ctx = g_option_context_new (NULL); + GOptionContext * ctx = g_option_context_new (NULL); g_option_context_add_group (ctx, g_irepository_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &error)) { g_print ("sample: %s\n", error->message); + g_option_context_free (ctx); + if (error) { + g_error_free (error); + } + return 1; } - g_autoptr(MesonSample) i = meson_sample_new ("Hello, meson/c!"); + MesonSample * i = meson_sample_new ("Hello, meson/c!"); meson_sample_print_message (i); + g_object_unref (i); + g_option_context_free (ctx); + return 0; } |