Re: GInterfaces and API Stability

On Wed, 2007-11-14 at 09:30 -0500, Morten Welinder wrote:
> I notice that there are no padding members in, for example,
> GtkCellLayoutIface.  Adding members therefore will change the
> struct size which sounds like a clear ABI change to me.
> Anyone who did
> typedef struct {
>     GtkCellLayoutIface clif;
>     Bar baz;
> } Foo;

Whyever would you do that? Such a struct would never be useful. All
actually used Iface objects (i.e. those that are registred with gobject,
etc) are dynamically allocated by the gtype machinery.

If you want to derive from an interface this is not how you do it (and
gobject doesn't allow interface inheritance). Instead you register a
pre-requisite on the "to be inherited" interface in your new interface.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]