From: Mathieu Bouchard Date: 2005-10-05T12:35:14+09:00 Subject: Re: patch.tgz On Wed, 5 Oct 2005, Tanaka Akira wrote: > In article , > Mathieu Bouchard writes: > > Also, sizeof(long)==sizeof(any*) except on MSDOS where near* is smaller > > but far* and huge* are bigger. > I heard sizeof(long)!=sizeof(any*) on 64bit Windows. > 64bit Windows is LLP. > i.e. sizeof(long long) == sizeof(void *) == 8 and sizeof(long) == 4. let's see... ruby.h, lines 90 to 100. #if SIZEOF_LONG == SIZEOF_VOIDP typedef unsigned long VALUE; typedef unsigned long ID; #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP typedef unsigned LONG_LONG VALUE; typedef unsigned LONG_LONG ID; #else # error ---->> ruby requires sizeof(void*) == sizeof(long) to be compiled. <<---- #endif I guess the #elif originally wasn't there but was added recently, just for the win64 case. How big is a long long on OS/400 ? At least you see that in Ruby it's required that VALUE is the same size as a void pointer. But wasn't my most important point that sizeof(A*)==sizeof(B*) for any types A,B on any platform? ____________________________________________________________________ Mathieu Bouchard - t�l:+1.514.383.3801 - http://artengine.ca/matju Freelance Digital Arts Engineer, Montr�al QC Canada