0 or 0L for empty pointers?

Friedrich W. H. Kossebau Friedrich.W.H at kossebau.de
Tue Jun 20 19:02:47 BST 2006


Hello,

looking through some apis from trunk I see a lot of 0L for empty pointers. I 
do not remember where I read it, but shouldn't it be never 0L and always 0 
for pointers?

IIRC it was something with sizeof(long)==sizeof(void*) not always true. Any 
experts?
Perhaps this could be added to the KDE Library Code Policy then...

Regards
Friedrich




More information about the kde-core-devel mailing list