MCPcopy Create free account
hub / github.com/DFHack/dfhack / str_dump

Function str_dump

depends/lua/src/lstrlib.c:189–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187
188
189static int str_dump (lua_State *L) {
190 luaL_Buffer b;
191 int strip = lua_toboolean(L, 2);
192 luaL_checktype(L, 1, LUA_TFUNCTION);
193 lua_settop(L, 1);
194 luaL_buffinit(L,&b);
195 if (lua_dump(L, writer, &b, strip) != 0)
196 return luaL_error(L, "unable to dump given function");
197 luaL_pushresult(&b);
198 return 1;
199}
200
201
202

Callers

nothing calls this directly

Calls 7

lua_tobooleanFunction · 0.85
luaL_checktypeFunction · 0.85
lua_settopFunction · 0.85
luaL_buffinitFunction · 0.85
lua_dumpFunction · 0.85
luaL_errorFunction · 0.85
luaL_pushresultFunction · 0.85

Tested by

no test coverage detected