MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / lua_tointeger

Function lua_tointeger

deps/lua/src/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 10

gmatch_auxFunction · 0.85
luaL_checkintegerFunction · 0.85
checkintFunction · 0.85
luaL_refFunction · 0.85
mp_encode_lua_integerFunction · 0.85
table_is_an_arrayFunction · 0.85
getfieldFunction · 0.85
g_readFunction · 0.85
db_getinfoFunction · 0.85
db_errorfbFunction · 0.85

Calls 1

index2adrFunction · 0.85

Tested by

no test coverage detected