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

Function luaO_tostringbuff

third-party/lua-5.5.0/src/lobject.c:449–458  ·  view source on GitHub ↗

** Convert a number object to a string, adding it to a buffer. */

Source from the content-addressed store, hash-verified

447** Convert a number object to a string, adding it to a buffer.
448*/
449unsigned luaO_tostringbuff (const TValue *obj, char *buff) {
450 int len;
451 lua_assert(ttisnumber(obj));
452 if (ttisinteger(obj))
453 len = lua_integer2str(buff, LUA_N2SBUFFSZ, ivalue(obj));
454 else
455 len = tostringbuffFloat(fltvalue(obj), buff);
456 lua_assert(len < LUA_N2SBUFFSZ);
457 return cast_uint(len);
458}
459
460
461/*

Callers 3

luaO_tostringFunction · 0.85
addnum2buffFunction · 0.85
(lua_numbertocstring)Function · 0.85

Calls 1

tostringbuffFloatFunction · 0.85

Tested by

no test coverage detected