On Fri, Sep 01, 2017 at 03:07:16AM +0000, Daniel Shahaf wrote:
> Evgeny Kotkov wrote on Thu, 31 Aug 2017 19:05 +0300:
> > Daniel Shahaf <d.s_at_daniel.shahaf.name> writes:
> > > Is adding this function an ABI-compatible change? The docstring of
> > > svn_delta_editor_t does say """
> > >
> > > * @note Don't try to allocate one of these yourself. Instead, always
> > > * use svn_delta_default_editor() or some other constructor, to ensure
> > > * that unused slots are filled in with no-op functions.
> > >
> > > """, but an API consumer might have interpreted this note as meaning "You may
> > > use malloc(..., sizeof(svn_delta_editor_t)) if you take care to initialize
> > > all struct members", in which case, his code will not be ABI compatible
> > > with 1.10.
> >
> > I think that adding this callback does not affect the ABI compatibility.
> > The note says "Don't try to allocate one of these yourself", whereas the
> > malloc(..., sizeof(svn_delta_editor_t)) example does exactly the opposite.
>
> I'm not sure I'm getting through here.
>
> The note does say "Don't allocate one of these yourself" but in the
> second sentence implies that the reason for this is that if you allocate
> it yourself and don't initialize all pointer-to-function members,
> Trouble will ensue. Therefore, the note could be construed as meaning
> that it is okay to allocate one of these yourself if you take care to
> initialize all pointer members.
The fact that a user can choose not to use the recommended API doesn't
mean that there is an ABI break. A user can already choose to allocate
the structure themselves and not initialize everything. Adding an item
to the struct doesn't change that.
I ran abi-compliance-checker[0] against the head of branches/1.9.x and
trunk. It shows no incompatibility issues. The report is attached for
anyone that wants to view it.
[0]: http://ispras.linuxbase.org/index.php/ABI_compliance_checker
Cheers,
--
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB
Received on 2017-09-01 14:15:14 CEST