tech-kern archive

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

Re: [patch] changing lua_Number to int64_t



Mouse wrote:
> Also, using an exact-width type assumes that the hardware/compiler in
> question _has_ such a type.
> 
> It's possible that lua, NetBSD, or the combination of the two is
> willing to write off portability to machines where one or both of those
> potential portability issues becomes actual.  But that seems to be
> asking for trouble to me; history is full of "but nobody will ever want
> to port this to one of _those_" that come back to bite people.

I was perfectly fine with long long because it's long enough to
represent all integers in range [-2^53-1, 2^53-1].

As Marc pointed out, Lua has a single numeric type which is double
by default. Many Lua libraries don't need FP and they use a subset of
exactly representable integers (not all of them do range checks, though).
Extending the range when porting from userspace to kernel will decrease
"the pain factor" of porting.

Alex


Home | Main Index | Thread Index | Old Index