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

Function luaV_tostring

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

Source from the content-addressed store, hash-verified

44
45
46int luaV_tostring (lua_State *L, StkId obj) {
47 if (!ttisnumber(obj))
48 return 0;
49 else {
50 char s[LUAI_MAXNUMBER2STR];
51 lua_Number n = nvalue(obj);
52 int l = lua_number2str(s, n);
53 setsvalue2s(L, obj, luaS_newlstr(L, s, l));
54 return 1;
55 }
56}
57
58
59static void traceexec (lua_State *L) {

Callers 1

lua_tolstringFunction · 0.70

Calls 1

luaS_newlstrFunction · 0.70

Tested by

no test coverage detected