[Bf-committers] ID Properties and 64 bits
Ton Roosendaal
ton at blender.org
Sun Apr 29 13:56:50 CEST 2007
Hi,
Don't make it more complex than it is is. We have in Blender code a
fixed assumption for variable types. Called the ILP32 and LP64.
Using 'int' therefore is safe, and always 32 bits.
We just need to find a way to squeeze Windows code/compiling into this
standard!
ILP32 LP64
char 8 8
short 16 16
int 32 32
long 32 64
pointer 32 64
long long 64 64
-Ton-
On 29 Apr, 2007, at 1:42, Joe Eagar wrote:
> Hi. I'm working out how ID properties will work in 64-bit blender.
> Currently I'm thinking that I should use int32_t
> <http://www.nongnu.org/avr-libc/user-manual/
> group__avr__stdint.html#gdb828ef50c2dbb783109824e94cf6c47> to store
> ints, to avoid all kinds of conversion woes (for example, id
> properties is a generic storage format, but what if someone stores a <
> 4 billion number in a 64-bit id property and its loaded into a 32-bit
> blender? should blender then use a long long instead of a normal int?
> Better to just use 32-bit ints all around).
>
> Int32_t is a C99 datatype (defined in stdint.h) that defines a 32-bit
> integer. Most likely a wrapping header will have to be made for irix
> and other platforms that are still at C89.
> This would of course mean adding int32_t
> <http://www.nongnu.org/avr-libc/user-manual/
> group__avr__stdint.html#gdb828ef50c2dbb783109824e94cf6c47> support to
> makesdna. While I'm add it, it may be a good idea to add intptr_t
> support too. Intptr_t is a C99 integer datatype capable of holding a
> pointer; we discussed on irc a while back possibly using it.
>
> Joe
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
>
------------------------------------------------------------------------
--
Ton Roosendaal Blender Foundation ton at blender.org
http://www.blender.org
More information about the Bf-committers
mailing list