On Wed, 5 Oct 2005, Tanaka Akira wrote:
> In article <Pine.LNX.4.58.0510042259190.2398 / web.artengine.ca>,
>   Mathieu Bouchard <matju / artengine.ca> 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˝═:+1.514.383.3801 - http://artengine.ca/matju
Freelance Digital Arts Engineer, Montr˝┬l QC Canada