Keeping binary compatibility

Michael Pyne mpyne at purinchu.net
Tue Oct 5 02:20:52 BST 2010


On Monday, October 04, 2010 17:55:30 Lubos Lunak wrote:
> On Monday 04 of October 2010, George Kiagiadakis wrote:
> > I think source compatibility is easier to maintain because it is more
> > obvious when you break it and people generally understand it better
> > than binary compatibility. I don't think we have a problem keeping
> > source compatibility atm, do we?
> 
>  We occassionally do (I e.g. remember fixing a bug somewhen in the past that
> had been introduced by broken source compatibility and people thinking 0 is
> a null pointer).

Are you referring to 0 in C, or in C++? I ask only because 0 really *is* the 
C++ null pointer (or at least, the only way of convincing the C++ compiler to 
use whatever the actual null pointer is), at least until C++0x's nullptr 
addition gets better supported.

The catch is that conversion from 0 to "real null pointer" only happens for 
pointer types, so if int is also possible, C++ is perfectly happy to not 
perform the conversion.

I know this only because this bit me bad when interfacing with gstreamer 
variadic functions on 64-bit...

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20101004/30227b1b/attachment.sig>


More information about the kde-core-devel mailing list