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
On Sun, Nov 17, 2013 at 7:56 PM, Christos Zoulas
<christos%zoulas.com@localhost> wrote:
> On Nov 17, 3:36pm, lourival.neto%gmail.com@localhost (Lourival Vieira Neto)
> wrote:
> -- Subject: Re: [patch] changing lua_Number to int64_t
>
> | > 1. Lua 5.3 will have 64 bit integer support as standard, which will
> | > make interop and reuse between kernel and userspace code much easier,
> | > iff we use int64_t
> |
> | If they are using int64_t for integers, I think it is a good reason to us to
> | stick to int64_t.
>
> This is not relevant. The numeric type will still be double, so forget
> about compatibility between kernel and userland. There is no need for
> the interpreter to use a fixed width type, but rather it is convenient
> to use the largest numeric type the machine can represent.
There will be two numeric types as standard, int64_t and double. It
should be possible to compile the kernel Lua with only int64_t and no
double support I would think, so integer only userland programs would
be compatible which is a very useful feature. But the semantics of the
Lua integer type will be such that it wraps at 64 bit, unlike some
hypothetical larger type (that doesn't yet exist and which the kernel
doesn't yet use).
Justin
Home |
Main Index |
Thread Index |
Old Index