Use g_autoptr() for GIO object types

GLib 2.44 supplies all the necessary autocleanup macros for GIO types,
and libglnx backports the relevant macros for ostree.
This commit is contained in:
Matthew Barnes committed 2015-05-06 21:51:19 -04:00
1 parent 7a62d64968
commit 4ee1acd981
51 files changed
+320 -320

No files matched your search

+4 -4
View File
@@ -40,7 +40,7 @@ cat_one_file (GFile *f,
GError **error)
{
gboolean ret = FALSE;
gs_unref_object GInputStream *in = NULL;
g_autoptr(GInputStream) in = NULL;
in = (GInputStream*)g_file_read (f, cancellable, error);
if (!in)
@@ -66,9 +66,9 @@ ostree_builtin_cat (int argc, char **argv, GCancellable *cancellable, GError **e
gboolean ret = FALSE;
int i;
const char *rev;
gs_unref_object GOutputStream *stdout_stream = NULL;
gs_unref_object GFile *root = NULL;
gs_unref_object GFile *f = NULL;
g_autoptr(GOutputStream) stdout_stream = NULL;
g_autoptr(GFile) root = NULL;
g_autoptr(GFile) f = NULL;
context = g_option_context_new ("COMMIT PATH... - Concatenate contents of files");