MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaV_tostring

Function luaV_tostring

deps/lua/src/lvm.c:47–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

lua_tolstringFunction · 0.85
lua_objlenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected