Subject:
Re: [ruby-ffi] Re: int size?
From:
Wayne Meissner
Date:
12/19/09 6:48 AM
To:
ruby-ffi@googlegroups.com

2009/12/19 rogerdpack <rogerpack2005@gmail.com>:
>> LP64 (used by unix) says that long, long long, pointer are 64bit,
>> everything else is the same as 32bit.
>
> Interesting.
> So ruby's "Fixnum" must internally be using a long...
>
>
>>> (1<<61).class
> => Fixnum # on 32 bit, BigNum

Yes.   But that is only on CRuby.  JRuby always has 64bit fixnums.

If you want to examine various native type metadata, you can use the
FFI::Type classes.  See http://ffi.github.com/api/FFI/Type.html

(that api doc is still very much a WiP and is an experiment to try out
yardoc, which is why its not linked from anywhere).