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

Re: Do opaque struct changes break C library ABIs



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.

Cheers,
-- 
 .''`.      Josselin Mouette
: :' :
`. `'
  `-


Reply to: