[openbeosnetteam] Re: NetDebug.h break BC

On Wednesday 13 November 2002 08:01 am, Philippe Houdoin wrote:
> Quoting Matthijs Hollemans:
> >> NetBuffer class is NOT binary compatible. I thought
> >> into fixing this myself, but can't find a quick BC HOWTO
> >
> > <http://home.concepts.nl/~hollies/midi/binarycompat.html>
>
> Oh, thanks for quick answer!
>
> So, based on this HOW-TO, the current/headers/os/net/NetBuffer.h
> break BC because:

And so will NetAddress and NetDebug, and NetEndpoint (which I haven't 
submitted to Philippe yet) be similarily broken.

> - the protected status_t m_init should be somewhere.
> I guess fInitialized make a good candidate to be replace by m_init...

Yes, you are correct, I was following the opentracker coding standard as 
suggested by the project pages.

> How I understand it, the order in which variables appears
> in the class definition doesn't matter here, as it's only important
> for the vtable layout, so only virtual methods, not variables?
>
> - _ReservedBNetBufferFBCCruft{1..6}() private virtuals methods should be
> there, in the same order.

My understanding is that private methods and data can be changed at will 
without breaking binary compatibility.  Honestly, though, I don't remember 
whether private virtual methods will show up in the vtable or not.  I'll do a 
little digging when I get home tonight.

> - And what about the newly added protected variables fData, fDataSize,
> fStackSize, fCapacity? No issue here?

What I did was to add these variables and at the same time, decrease the 
number of elements in the private member array (the name escapes me at the 
moment).  The binary size of the class would remain the same.

Cheers,
Scott

Other related posts: