lua-users home
lua-l archive

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


>I've already defined LUA_NUM_TYPE as float, but there are plenty of doubles that this leaves behind.  I've defined a lua_Number type and replaced all remaining doubles with this (I know there's already a Number type, but wanted the "lua_" in front for the API defs).

This has been been fixed in 4.1w.

>My question: Is this safe?

Probably. The only thing you mught want to check is whether strtod is
supported by your compiler or if there is strtof (there isn't in ANSI C).

>Does anyone familiar with these files know what will happen if ints are not represented precisely by the floats?

I don't think the code ever assumes that ints fit into a Number. I think it
only uses small ints that should fit.
--lhf