Re: 5.3
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: 5.3
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2015年1月13日 16:32:26 -0200
> In some situation of lua_tointeger(lua, 1) i take wrong values or 0
> Not sure at moment what the problem it is.
A 0 can mean that the value at that position is not an integer (that
is, it is a float with a fractional part). You may want to compile Lua
defining the macro LUA_FLOORN2I (-DLUA_FLOORN2I) to see whether it
helps. (That macro makes Lua convert non-integer floating points to
integers by taking their floor.)
-- Roberto