autocleanups: Add G*Array types
authorColin Walters <walters@verbum.org>
Thu, 19 Feb 2015 23:31:29 +0000 (18:31 -0500)
committerColin Walters <walters@verbum.org>
Fri, 20 Feb 2015 12:08:50 +0000 (07:08 -0500)
Not sure how these were omitted.  Probably few people are really using
this yet...and we don't have test cases (that's in the other patch).

https://bugzilla.gnome.org/show_bug.cgi?id=744830

glib/glib-autocleanups.h

index df654e582d296689371c8535247e77ec6df5053e..902e95275dc56d029d41a4ff3a3b1155ca5b6d21 100644 (file)
@@ -33,6 +33,9 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GHmac, g_hmac_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GIOChannel, g_io_channel_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GKeyFile, g_key_file_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GList, g_list_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GArray, g_array_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPtrArray, g_ptr_array_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GByteArray, g_byte_array_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMainContext, g_main_context_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMainLoop, g_main_loop_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSource, g_source_unref)