MCPcopy Create free account
hub / github.com/defold/defold / lua_tointeger

Function lua_tointeger

engine/lua/src/lua/lapi.c:323–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321
322
323LUA_API lua_Integer lua_tointeger (lua_State *L, int idx) {
324 TValue n;
325 const TValue *o = index2adr(L, idx);
326 if (tonumber(o, &n)) {
327 lua_Integer res;
328 lua_Number num = nvalue(o);
329 lua_number2integer(res, num);
330 return res;
331 }
332 else
333 return 0;
334}
335
336
337LUA_API int lua_toboolean (lua_State *L, int idx) {

Callers 15

TEST_FFunction · 0.85
TEST_FFunction · 0.85
GetLuaTracebackFunction · 0.85
GetUserTypeFunction · 0.85
GetUserDataFunction · 0.85
CreateCallbackFunction · 0.85
IsCallbackInstanceValidFunction · 0.85
GetTableIntValueFunction · 0.85

Calls 1

index2adrFunction · 0.85

Tested by 4

TEST_FFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68