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

Function clearbuff

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

Source from the content-addressed store, hash-verified

534
535
536static const char *clearbuff (BuffFS *buff) {
537 lua_State *L = buff->L;
538 const char *res;
539 if (luaD_rawrunprotected(L, pushbuff, buff) != LUA_OK) /* errors? */
540 res = NULL; /* error message is on the top of the stack */
541 else
542 res = getstr(tsvalue(s2v(L->top.p - 1)));
543 if (buff->b != buff->space) /* using dynamic buffer? */
544 luaM_freearray(L, buff->b, buff->buffsize); /* free it */
545 return res;
546}
547
548
549static void addstr2buff (BuffFS *buff, const char *str, size_t slen) {

Callers 1

luaO_pushvfstringFunction · 0.70

Calls 1

luaD_rawrunprotectedFunction · 0.70

Tested by

no test coverage detected