2011/12/11 Tal Hadad <tal...@hotmail.com>

>
> I've read how GObject define virtual methods, in the XClass struct, and
> I'm afraid defining new virtual method can break ABI. Am I right?
> Before:
> struct _XClass
> {
> GObjectClass parent_class;
>
> /* stuff */
> void (*do_action) (X *self, /* parameters */);
> };
>
> After:
> struct _XClass
> {
>
> GObjectClass parent_class;
>
>
> /* stuff */
>
>
> void (*another_action) (X *self, /* parameters */);
>
> void (*do_action) (X *self, /* parameters */);
>
> };
>
> Can this case break ABI?
>
>
Yes it does. What C programmers often do is adding unused vfuncs as padding
for future extension of the class. From this perspective Vala could
theoretically add some kind of padding to avoid abi breakage.

-- 
www.debian.org - The Universal Operating System
_______________________________________________
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to