0 or 0L for empty pointers?

Thiago Macieira thiago at kde.org
Wed Jun 21 09:59:20 BST 2006


David Faure wrote:
>On Tuesday 20 June 2006 23:15, Michael Buesch wrote:
>> On Tuesday 20 June 2006 20:02, Friedrich W. H. Kossebau wrote:
>> > IIRC it was something with sizeof(long)==sizeof(void*) not always
>> > true. Any experts?
>>
>> sizeof(long)==sizeof(void*) is an assumption in the linux kernel, at
>> least. So it is true for all archs which are supported by linux.
>> I don't know if there are archs supported by KDE for which this is not
>> true, though.
>
>I was told that this assumption doesn't hold on Windows-64bit.

No, it doesn't.

All 32-bit machines I know use the ILP32 concept (ints, longs and pointers 
are 32 bits). All 64-bit Unixes I know are LP64.

But Windows 64-bit isn't. It's P64: longs are still 32-bit. Worst of all: 
Microsoft brags about it :-)

-- 
Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
  thiago.macieira (AT) trolltech.com     Trolltech ASA
    GPG: 0x6EF45358                   |  Sandakerveien 116,
    E067 918B B660 DBD1 105C          |  NO-0402
    966C 33F5 F005 6EF4 5358          |  Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060621/3aab35ad/attachment.sig>


More information about the kde-core-devel mailing list