MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / lua_tointeger

Function lua_tointeger

lua/lapi.c:324–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 14

gmatch_auxFunction · 0.85
get_date_valueFunction · 0.85
l_blob_indexFunction · 0.85
l_blob_newindexFunction · 0.85
luaL_checkintegerFunction · 0.85
checkintFunction · 0.85
luaL_refFunction · 0.85
table_to_csonFunction · 0.85
db_comdb_truncate_timeFunction · 0.85
getfieldFunction · 0.85
g_readFunction · 0.85

Calls 1

index2adrFunction · 0.85

Tested by

no test coverage detected