MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / pushstr

Function pushstr

3rd/lua-5.4.3/src/lobject.c:405–412  ·  view source on GitHub ↗

** Push given string to the stack, as part of the buffer, and ** join the partial strings in the stack into one. */

Source from the content-addressed store, hash-verified

403** join the partial strings in the stack into one.
404*/
405static void pushstr (BuffFS *buff, const char *str, size_t l) {
406 lua_State *L = buff->L;
407 setsvalue2s(L, L->top, luaS_newlstr(L, str, l));
408 L->top++; /* may use one extra slot */
409 buff->pushed++;
410 luaV_concat(L, buff->pushed); /* join partial results into one */
411 buff->pushed = 1;
412}
413
414
415/*

Callers 2

clearbuffFunction · 0.85
addstr2buffFunction · 0.85

Calls 2

luaS_newlstrFunction · 0.85
luaV_concatFunction · 0.85

Tested by

no test coverage detected