gobject: add autoptr support for GClosure

This commit defines a g_autoptr() cleanup function for use with
GClosure.

https://bugzilla.gnome.org/show_bug.cgi?id=786360
This commit is contained in:
Ernestas Kulik 2017-08-16 14:19:30 +03:00
parent 44b5036714
commit 00f5d2ffa2

View File

@ -21,6 +21,7 @@
#error "Only <glib-object.h> can be included directly."
#endif
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GClosure, g_closure_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset)