MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / close_state

Function close_state

Source/Misc/lua/src/lua.c:9020–9031  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9018
9019
9020static void close_state (lua_State *L) {
9021global_State *g = G(L);
9022luaF_close(L, L->stack); /* close all upvalues for this thread */
9023luaC_freeall(L); /* collect all objects */
9024lua_assert(g->rootgc == obj2gco(L));
9025lua_assert(g->strt.nuse == 0);
9026luaM_freearray(L, G(L)->strt.hash, G(L)->strt.size, TString *);
9027luaZ_freebuffer(L, &g->buff);
9028freestack(L, L);
9029lua_assert(g->totalbytes == sizeof(LG));
9030(*g->frealloc)(g->ud, fromstate(L), state_size(LG), 0);
9031}
9032
9033
9034lua_State *luaE_newthread (lua_State *L) {

Callers 2

lua_newstateFunction · 0.85
lua_closeFunction · 0.85

Calls 3

luaF_closeFunction · 0.85
luaC_freeallFunction · 0.85
freestackFunction · 0.85

Tested by

no test coverage detected