MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / f_luaopen

Function f_luaopen

src/lstate.cpp:214–228  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

212** open parts of the state that may cause memory-allocation errors.
213*/
214static void f_luaopen (lua_State *L, void *ud) {
215 global_State *g = G(L);
216 UNUSED(ud);
217 stack_init(L, L); /* init stack */
218 init_registry(L, g);
219 luaS_init(L);
220 luaT_init(L);
221 luaX_init(L);
222 g->gcstp = 0; /* allow gc */
223 setnilvalue(&g->nilvalue); /* now state is complete */
224#ifndef PLUTO_NO_DEFAULT_TABLE_METATABLE
225 setnilvalue(&g->table_mt);
226#endif
227 luai_userstateopen(L);
228}
229
230
231/*

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected