|
Am 01.05.2014 09:21 schröbte David Demelier:
Hi guys,
Hi!
Some functions already return the type retrieved like lua_getuservalue, lua_getglobal. It would be nice to have the same behavior for lua_getfield. So one can easily do: if (lua_getfield(L, -2, "x") == LUA_TNUMBER) x = lua_tointeger(L, -1); lua_pop(L, 1);
That already works in Lua-5.3work2. It is just not documented yet. But the same request could be made (not sure it hasn't) for `lua_getuservalue` which in Lua 5.3 works for multiple types ...
Kind regards, David.
Philipp