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

Function luaV_tonumber

third-party/lua-5.1.5/src/lvm.c:35–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34
35const TValue *luaV_tonumber (const TValue *obj, TValue *n) {
36 lua_Number num;
37 if (ttisnumber(obj)) return obj;
38 if (ttisstring(obj) && luaO_str2d(svalue(obj), &num)) {
39 setnvalue(n, num);
40 return n;
41 }
42 else
43 return NULL;
44}
45
46
47int luaV_tostring (lua_State *L, StkId obj) {

Callers 2

ArithFunction · 0.70
luaG_aritherrorFunction · 0.70

Calls 1

luaO_str2dFunction · 0.70

Tested by

no test coverage detected