Binary compatibility and padding

2015-04-11 Thread Juan R. Garcia Blanco
Hi,

In GNOME Dictionary 3.16.0, _GdictDefboxClass provided four members that
are function pointers 'for future expansion'. If I understand this
correctly, these four extra members act as a place holder in case we
want to add a new meaningful function pointer member, therefore removing
one of the extra ones. This is done in order to provide binary
compatibility I think.

On the road to GNOME Dictionary 3.16.1, I have added a new signal to
GdictDefbox, therefore adding a new function pointer member to
_GdictDefboxClass, but I have not removed any of the extra members. So
my question is: should I remove one of the extra members to preserve
binary compatibility? Or should I just simply increment LT_VERSION
appropriately?

Thank you very much in advance.

Best regards,
Juan.

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Binary compatibility and padding

2015-04-11 Thread Philip Withnall
On Sat, 2015-04-11 at 15:43 +0200, Juan R. Garcia Blanco wrote:
> Hi,
> 
> In GNOME Dictionary 3.16.0, _GdictDefboxClass provided four members that
> are function pointers 'for future expansion'. If I understand this
> correctly, these four extra members act as a place holder in case we
> want to add a new meaningful function pointer member, therefore removing
> one of the extra ones. This is done in order to provide binary
> compatibility I think.
> 
> On the road to GNOME Dictionary 3.16.1, I have added a new signal to
> GdictDefbox, therefore adding a new function pointer member to
> _GdictDefboxClass, but I have not removed any of the extra members. So
> my question is: should I remove one of the extra members to preserve
> binary compatibility? Or should I just simply increment LT_VERSION
> appropriately?

You should remove one of the padding members, otherwise the size of the
GdictDefboxClass structure has changed, and binary compatibility is
broken.

Philip


signature.asc
Description: This is a digitally signed message part
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list