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

Function lua_tonumberx

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

Source from the content-addressed store, hash-verified

333
334
335LUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *isnum) {
336 TValue n;
337 const TValue *o = index2addr(L, idx);
338 if (tonumber(o, &n)) {
339 if (isnum) *isnum = 1;
340 return nvalue(o);
341 }
342 else {
343 if (isnum) *isnum = 0;
344 return 0;
345 }
346}
347
348
349LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *isnum) {

Callers 2

luaB_tonumberFunction · 0.70
luaL_checknumberFunction · 0.70

Calls 1

index2addrFunction · 0.70

Tested by

no test coverage detected