GNOME Bugzilla – Bug 743939
Add G_DECLARE_INTERFACE
Last modified: 2015-02-06 11:22:30 UTC
Would be nice to simplify interfaces as well.
Created attachment 296035 [details] [review] Add G_DECLARE_INTERFACE
Created attachment 296036 [details] [review] GListModel: Use G_DECLARE_INTERFACE
It's missing the g_auto stuff, not sure how they work.
Thanks for the patch. In short, we need to add a 'GObject' parameter to the macro so that we can use _GLIB_DEFINE_AUTOPTR_CHAINUP(). It's sort of annoying that we have to do this, but this is sort of the reason that interfaces have pre-reqs. On the bright side, this makes G_DECLARE_INTERFACE look just the same as G_DECLARE_*_TYPE.
Created attachment 296040 [details] [review] Add G_DECLARE_INTERFACE
Created attachment 296041 [details] [review] GListModel: Use G_DECLARE_INTERFACE
Created attachment 296062 [details] [review] Add G_DECLARE_INTERFACE
Code pushed as wip/xclaesse/declare-iface
Attachment 296041 [details] pushed as b553841 - GListModel: Use G_DECLARE_INTERFACE Attachment 296062 [details] pushed as 3d39b8e - Add G_DECLARE_INTERFACE Was perfect as-is, so pushed. I particularly like this line in the patch :) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(GListModel, g_object_unref) Thanks very much.