lua-users home
lua-l archive

Re: Macros for setting / testing / getting value components in lobject.h

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 9 June 2015 at 13:00, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>> My implementation is on 64-bit machine with 64-bit integers - so it
>> can work on 64-bit.
>
> How do you do that??
>
I overlay the double with the type code.
So the structure looks like this:
|------ first 8 bytes ----------| |------- second 8 bytes -------|
 value other than double type code (int) union
 including 64-bit int with double
Since the size of the value object is 16 bytes anyway it doesn't
change the overall size.
Regards
Dibyendu

AltStyle によって変換されたページ (->オリジナル) /