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

Function f_luaopen

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

** open parts of the state that may cause memory-allocation errors. ** ('g->version' != NULL flags that the state was completely build) */

Source from the content-addressed store, hash-verified

209** ('g->version' != NULL flags that the state was completely build)
210*/
211static void f_luaopen (lua_State *L, void *ud) {
212 global_State *g = G(L);
213 UNUSED(ud);
214 stack_init(L, L); /* init stack */
215 init_registry(L, g);
216 luaS_init(L);
217 luaT_init(L);
218 luaX_init(L);
219 g->gcrunning = 1; /* allow gc */
220 g->version = lua_version(NULL);
221 luai_userstateopen(L);
222}
223
224
225/*

Callers

nothing calls this directly

Calls 6

stack_initFunction · 0.85
init_registryFunction · 0.85
luaS_initFunction · 0.85
luaT_initFunction · 0.85
luaX_initFunction · 0.85
lua_versionFunction · 0.85

Tested by

no test coverage detected