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

Function copy2buff

third-party/lua-5.5.0/src/lvm.c:668–677  ·  view source on GitHub ↗

copy strings in stack from top - n up to top - 1 to buffer */

Source from the content-addressed store, hash-verified

666
667/* copy strings in stack from top - n up to top - 1 to buffer */
668static void copy2buff (StkId top, int n, char *buff) {
669 size_t tl = 0; /* size already copied */
670 do {
671 TString *st = tsvalue(s2v(top - n));
672 size_t l; /* length of string being copied */
673 const char *s = getlstr(st, l);
674 memcpy(buff + tl, s, l * sizeof(char));
675 tl += l;
676 } while (--n > 0);
677}
678
679
680/*

Callers 1

luaV_concatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected