MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / close_state

Function close_state

libraries/AP_Scripting/lua/src/lstate.c:250–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248
249
250static void close_state (lua_State *L) {
251 global_State *g = G(L);
252 luaF_close(L, L->stack); /* close all upvalues for this thread */
253 luaC_freeallobjects(L); /* collect all objects */
254 if (g->version) /* closing a fully built state? */
255 luai_userstateclose(L);
256 luaM_freearray(L, G(L)->strt.hash, G(L)->strt.size);
257 freestack(L);
258 lua_assert(gettotalbytes(g) == sizeof(LG));
259 (*g->frealloc)(g->ud, fromstate(L), sizeof(LG), 0); /* free main block */
260}
261
262
263LUA_API lua_State *lua_newthread (lua_State *L) {

Callers 2

lua_newstateFunction · 0.85
lua_closeFunction · 0.85

Calls 3

luaF_closeFunction · 0.85
luaC_freeallobjectsFunction · 0.85
freestackFunction · 0.85

Tested by

no test coverage detected