On Sun, Nov 17, 2013 at 6:13 PM, Justin Cormack <[email protected]> wrote: > On Sun, Nov 17, 2013 at 7:56 PM, Christos Zoulas <[email protected]> wrote: >> On Nov 17, 3:36pm, [email protected] (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).
Well, I don't think I fully understood that; mainly because I'm not aware about Lua 5.3. It will provide two number types for the scripts? Or you are just talking about lua_Integer type on the C-side. Lua 5.1 already has a lua_Integer type that is defined as ptrdiff_t. Regards, -- Lourival Vieira Neto
