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

Function writer

3rd/lua-5.4.3/src/lstrlib.c:222–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220
221
222static int writer (lua_State *L, const void *b, size_t size, void *ud) {
223 struct str_Writer *state = (struct str_Writer *)ud;
224 if (!state->init) {
225 state->init = 1;
226 luaL_buffinit(L, &state->B);
227 }
228 luaL_addlstring(&state->B, (const char *)b, size);
229 return 0;
230}
231
232
233static int str_dump (lua_State *L) {

Callers

nothing calls this directly

Calls 2

luaL_buffinitFunction · 0.85
luaL_addlstringFunction · 0.85

Tested by

no test coverage detected