MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaV_tonumber

Function luaV_tonumber

freebsd/contrib/openzfs/module/lua/lvm.c:34–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

luaV_arithFunction · 0.70
luaG_aritherrorFunction · 0.70

Calls 1

luaO_str2dFunction · 0.70

Tested by

no test coverage detected