[Bf-committers] LLP64 / LP64 (win64 vs rest) issue
Daniel Genrich
daniel.genrich at gmx.net
Sun Jul 27 12:05:29 CEST 2008
Hi there,
In an attempt to create a Windows 64bit version, Blender needs an
official way to deal with the fact that:
long is 32bit on Win64 (LP64)
long is 64bit on Linux64/Mac64 (LLP64)
So the whole long-pointer casting is kind of going wrong on Win64 and
therefore crashing Blender.
As a proposal I suggest not to use "long" but to introduce the C99/C9X
standard type "uintptr_t" which is already used in many header of the
libs which Blender uses (ffmpeg, python, X264, SDL). This type would
allow instant pointer fiddling and cross plattform compatibility between
LLP64 and LP64 plattforms.
I would also search-replace the existing "long"s in Blender.
The goal for this is post-2.47 so we can test it on several plattforms
and harden it a bit (e.g. some older compilers don't define that
uintptr_t type).
Any comments / suggestions?
Greetings
Daniel / Genscher
More information about the Bf-committers
mailing list