From cdfc79aae9d4c123ab15fea9cf1e4429f15aba66 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 15 May 2018 15:30:01 +0100 Subject: [PATCH] gobject: Add g_autoptr() support for GParamSpec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not add support for its subtypes, since all their constructors return GParamSpec*, and g_param_spec_unref() takes a GParamSpec* rather than a gpointer — adding G_DEFINE_AUTOPTR_CLEANUP_FUNC() for subtypes of GParamSpec results in compiler warnings about mismatched parameter types (GParamSpecBoolean* vs GParamSpec*, for example). Signed-off-by: Philip Withnall https://bugzilla.gnome.org/show_bug.cgi?id=796139 --- gobject/gobject-autocleanups.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gobject/gobject-autocleanups.h b/gobject/gobject-autocleanups.h index 8aeda2eb9..cc353bf9a 100644 --- a/gobject/gobject-autocleanups.h +++ b/gobject/gobject-autocleanups.h @@ -24,4 +24,5 @@ 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_AUTOPTR_CLEANUP_FUNC(GParamSpec, g_param_spec_unref) G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset)