MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / f_luaopen

Function f_luaopen

third-party/lua-5.2.4/src/lstate.c:183–197  ·  view source on GitHub ↗

** open parts of the state that may cause memory-allocation errors */

Source from the content-addressed store, hash-verified

181** open parts of the state that may cause memory-allocation errors
182*/
183static void f_luaopen (lua_State *L, void *ud) {
184 global_State *g = G(L);
185 UNUSED(ud);
186 stack_init(L, L); /* init stack */
187 init_registry(L, g);
188 luaS_resize(L, MINSTRTABSIZE); /* initial size of string table */
189 luaT_init(L);
190 luaX_init(L);
191 /* pre-create memory-error message */
192 g->memerrmsg = luaS_newliteral(L, MEMERRMSG);
193 luaS_fix(g->memerrmsg); /* it should never be collected */
194 g->gcrunning = 1; /* allow gc */
195 g->version = lua_version(NULL);
196 luai_userstateopen(L);
197}
198
199
200/*

Callers

nothing calls this directly

Calls 6

stack_initFunction · 0.70
init_registryFunction · 0.70
luaS_resizeFunction · 0.70
luaT_initFunction · 0.70
luaX_initFunction · 0.70
lua_versionFunction · 0.70

Tested by

no test coverage detected