aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2016-08-29 10:11:40 -0300
committerThibault Saunier <tsaunier@gnome.org>2016-08-29 10:11:40 -0300
commit5780c42b705a3d99dc4f4895470be092ba6c6f00 (patch)
tree63a2fd32340daa719b8c8445fd8595b196ebe9fe
parent082cb075b02d61494fa0507a4672ffc92ce8ee1c (diff)
downloadmeson-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.c14
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;
}