Re: [Vala] Can adding new virtual method break ABI?
- From: Luca Bruno <lethalman88 gmail com>
- To: Tal Hadad <tal_hd hotmail com>
- Cc: Vala Mail List <vala-list gnome org>
- Subject: Re: [Vala] Can adding new virtual method break ABI?
- Date: Sun, 11 Dec 2011 10:48:21 +0100
2011/12/11 Tal Hadad <tal_hd 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]