MCPcopy Create free account
hub / github.com/DFHack/dfhack / f_luaopen

Function f_luaopen

depends/lua/src/lstate.c:203–214  ·  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

201** ('g->version' != NULL flags that the state was completely build)
202*/
203static void f_luaopen (lua_State *L, void *ud) {
204 global_State *g = G(L);
205 UNUSED(ud);
206 stack_init(L, L); /* init stack */
207 init_registry(L, g);
208 luaS_init(L);
209 luaT_init(L);
210 luaX_init(L);
211 g->gcrunning = 1; /* allow gc */
212 g->version = lua_version(NULL);
213 luai_userstateopen(L);
214}
215
216
217/*

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