MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / close_state

Function close_state

other_src/lua/src/lstate.cpp:108–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106
107
108static void close_state (lua_State *L) {
109 global_State *g = G(L);
110 luaF_close(L, L->stack); /* close all upvalues for this thread */
111 luaC_freeall(L); /* collect all objects */
112 lua_assert(g->rootgc == obj2gco(L));
113 lua_assert(g->strt.nuse == 0);
114 luaM_freearray(L, G(L)->strt.hash, G(L)->strt.size, TString *);
115 luaZ_freebuffer(L, &g->buff);
116 freestack(L, L);
117 lua_assert(g->totalbytes == sizeof(LG));
118 (*g->frealloc)(g->ud, fromstate(L), state_size(LG), 0);
119}
120
121
122lua_State *luaE_newthread (lua_State *L) {

Callers 2

lua_newstateFunction · 0.70
lua_closeFunction · 0.70

Calls 3

luaF_closeFunction · 0.70
luaC_freeallFunction · 0.70
freestackFunction · 0.70

Tested by

no test coverage detected