[Bf-committers] Sharp/Flat selections

Stealth Apprentice stealthapprentice at yahoo.com
Thu Dec 29 02:40:41 CET 2005


A long is 4 bytes even on 64 bit windows (backwards compatibility). long long is 8 bytes. ptrdiff_t is an integer large enough to hold a pointer on the target platform (4 bytes on 32 bit windows, 8 on 64 bit). Short int is always 16 bits on either windows.

Ken Hughes <khughes at pacific.edu> wrote: Tom M wrote:
>>One thing I don't like about this code (and this certainly
>>isn't the only place in the code this happens), is that
>>it uses the fact that the (short int) edge flags eed->f1
>>and eed->f2 are consecutive, and casts that storage to
>>be a long int.
> 
> 
> Is that safe for 64 bit systems too?  Also are compilers allowed to
> reorder stuff in structs at high optimization levels?  Also would
> making it a true long int and having the old f1 and f2 accessed via a
> bitmask method work?

It would be problematic on 64-bit machines anyway. Isn't a short int 
should 16-bits but on 64-bit machines (except WinXP) a long would be 
64-bits?  Or is a long int the same as an int?

Ken
_______________________________________________
Bf-committers mailing list
Bf-committers at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-committers



		
---------------------------------
Yahoo! for Good - Make a difference this year. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.blender.org/pipermail/bf-committers/attachments/20051228/9d23e80b/attachment.html


More information about the Bf-committers mailing list