[Spice-devel] [PATCH spice-gtk 08/15] gtk: do not require glib session private fields

Jonathon Jongsma jjongsma at redhat.com
Wed Nov 26 07:46:24 PST 2014


On Wed, 2014-11-26 at 14:02 +0100, Marc-André Lureau wrote:
> Hi
> 
> On Wed, Nov 26, 2014 at 12:05 AM, Jonathon Jongsma <jjongsma at redhat.com> wrote:
> > So, you just added internal accessor functions for a bunch of other
> > session member variables (_get_webdav_magic(), etc.). But for these, you
> > used the GObject data functions. Why are these variables treated
> > differently? By using g_object_get|set_data(), you lose some type
> > safety, and make things harder to debug since you can't look directly at
> > struct members, etc. I'd really rather just add setters/getters for
> > these variables.
> 
> Right, I should have explained the reason. The problem is gtk-session
> and desktop-integration are in the gtk library SpiceSession is in
> glib. So far we had the SessionPriv structure shared between the two
> libraries, so they could fit their pointers there. But this is no
> longer possible when moving the private structure in .c. We could had
> more accessors, but they would need to be in public API, and this
> isn't supposed to be accessed by API users. Thus, I think GObject data
> usage is justified here.


Hm, I still don't like it, but the reasoning is sound.  ACK.




More information about the Spice-devel mailing list