GNOME Bugzilla – Bug 796139
Add g_autoptr() support for GParamSpec
Last modified: 2018-05-15 16:54:27 UTC
Support g_autoptr(GParamSpec).
Created attachment 372072 [details] [review] gobject: Add g_autoptr() support for GParamSpec 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 <withnall@endlessm.com>
Review of attachment 372072 [details] [review]: Sure, even though holding on to GParamSpecs this way is kind of weird.
Thanks. It is needed for my evil plan. (https://github.com/endlessm/mogwai/blob/master/libmogwai-schedule/tests/signal-logger.h) Attachment 372072 [details] pushed as cdfc79a - gobject: Add g_autoptr() support for GParamSpec