[vtk-developers] Guidance needed fixing problems doing 64bit compile on Mac OS X

Paul Tait paul at opes.com.au
Thu Oct 26 20:14:27 EDT 2006


Sean McBride wrote:
> On 2006-10-26 13:00, David Gobbi said:
>
>   
>> As David Cole mentioned, basic types are preferred to ease integration 
>> with scripting languages.
>> I really don't like to use types like ptrdiff_t as part of any VTK 
>> interface (internal or otherwise)
>> because of this.
>>     
>
> I'm glad I posted to this list, I keep forgetting about those wrappings! :)
>
>   
>> On UNIX/Linux (i.e. X) a long is sufficient, and the only other 
>> platforms we need to worry
>> about are Mac and Windows.  So if long will work on Mac and Windows, it 
>> seems like the
>> best choice.
>>     
>
> Well, I'm no Windows expert, but a quick googling reveals:
>
> <http://www.microsoft.com/whdc/driver/kernel/64bit_chklist.mspx>
> "Pointers are 64 bits in length, but integer and long data types remain
> 32 bits."
>
> I guess we could use 'long long'.  Although theoretically it needn't be
> 64 bits, I believe in practice it always is.
>
>   

Microsoft have invented ULONG_PTR to handle this problem.

Paul Tait



More information about the vtk-developers mailing list