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

Function lua_dump

third-party/lua-5.5.0/src/lapi.c:1148–1159  ·  view source on GitHub ↗

** Dump a Lua function, calling 'writer' to write its parts. Ensure ** the stack returns with its original size. */

Source from the content-addressed store, hash-verified

1146** the stack returns with its original size.
1147*/
1148LUA_API int lua_dump (lua_State *L, lua_Writer writer, void *data, int strip) {
1149 int status;
1150 ptrdiff_t otop = savestack(L, L->top.p); /* original top */
1151 TValue *f = s2v(L->top.p - 1); /* function to be dumped */
1152 lua_lock(L);
1153 api_checkpop(L, 1);
1154 api_check(L, isLfunction(f), "Lua function expected");
1155 status = luaU_dump(L, clLvalue(f)->p, writer, data, strip);
1156 L->top.p = restorestack(L, otop); /* restore top */
1157 lua_unlock(L);
1158 return status;
1159}
1160
1161
1162LUA_API int lua_status (lua_State *L) {

Callers 1

str_dumpFunction · 0.70

Calls 1

luaU_dumpFunction · 0.70

Tested by

no test coverage detected