MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / lua_tointegerx

Function lua_tointegerx

third-party/lua-5.2.4/src/lapi.c:349–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347
348
349LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *isnum) {
350 TValue n;
351 const TValue *o = index2addr(L, idx);
352 if (tonumber(o, &n)) {
353 lua_Integer res;
354 lua_Number num = nvalue(o);
355 lua_number2integer(res, num);
356 if (isnum) *isnum = 1;
357 return res;
358 }
359 else {
360 if (isnum) *isnum = 0;
361 return 0;
362 }
363}
364
365
366LUA_API lua_Unsigned lua_tounsignedx (lua_State *L, int idx, int *isnum) {

Callers 3

luaL_checkintegerFunction · 0.70
luaL_lenFunction · 0.70
getfieldFunction · 0.70

Calls 1

index2addrFunction · 0.70

Tested by

no test coverage detected