MCPcopy Create free account
hub / github.com/F-Stack/f-stack / f_luaopen

Function f_luaopen

freebsd/contrib/openzfs/module/lua/lstate.c:180–194  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected