[Libreoffice] cppu::OPropertySetHelper ABI backwards compatibility
Stephan Bergmann
stephan.bergmann.secondary at googlemail.com
Tue Aug 23 10:57:17 PDT 2011
On Aug 23, 2011, at 5:09 PM, Lionel Elie Mamane wrote:
> On Mon, Aug 22, 2011 at 11:53:59PM +0200, Eike Rathke wrote:
>> On Monday, 2011-08-22 15:30:04 -0400, Kohei Yoshida wrote:
>
>>> What this tells me is that, we can't change OPropertySetHelper
>>> implementation, at least not in a way that changes its virtual
>>> function table (until LibreOffice 4 I suppose), which cripples us
>>> since there are still opportunities to improve that code.
>
>> There may be a way out of it: _append_ the new virtual function
>> after all existing. This works only though if new code using it is
>> not mixed with old implementation. Old code using the new
>> implementation shouldn't see a problem as it expects the vtable to
>> be shorter, unless someone derived from OPropertySetHelper then
>> there may be problems again. Maybe too vague.
>
> And won't *other* stuff be moved around? For example, because the
> vtable is longer, m_pReserved is at another offset in the class,
> breaking ABI again?
The offset of m_pReserved would not be affected by changes to the vtable's size (with de-facto standard C++ ABIs). But what could indeed break is if old code (that is not recompiled) derives classes from OPropertySetHelper---which is likely, given that OPropertySetHelper is designed to be derived from.
-Stephan
More information about the LibreOffice
mailing list