Re: Do opaque struct changes break C library ABIs
Josselin Mouette <joss@debian.org> writes:
> Le jeudi 16 mai 2013 à 17:35 -0700, Russ Allbery a écrit :
>> I have a C shared library that takes a pointer to an opaque struct as
>> the first argument to most of its API calls. The internal layout of
>> that opaque struct is changing (to add new members). The only way to
>> create the opaque state struct is via a call to remctl_new(), which
>> returns a pointer to it. Nothing else about the ABI is changing, and
>> client programs cannot see or manipulate the struct members directly
>> (at least without poking about in memory, of course).
>>
>> Is that an ABI break that requires an SONAME change?
> Opaque structures are usually here precisely to avoid SONAME changes.
> Glib and GTK+ do that all the time, and I don’t see applications
> breaking horribly, unless they do unwarranted assumptions about the
> internals of those structures.
> So if this is the only change, I’d say you are pretty safe here.
Cool, thanks (and to everyone else as well) for the replies. I was
*fairly* sure that I understood this, but I didn't want to release
something and then be wrong. :)
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: