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

Function f_luaopen

app/redis-6.2.6/deps/lua/src/lstate.c:70–81  ·  view source on GitHub ↗

** open parts that may cause memory-allocation errors */

Source from the content-addressed store, hash-verified

68** open parts that may cause memory-allocation errors
69*/
70static void f_luaopen (lua_State *L, void *ud) {
71 global_State *g = G(L);
72 UNUSED(ud);
73 stack_init(L, L); /* init stack */
74 sethvalue(L, gt(L), luaH_new(L, 0, 2)); /* table of globals */
75 sethvalue(L, registry(L), luaH_new(L, 0, 2)); /* registry */
76 luaS_resize(L, MINSTRTABSIZE); /* initial size of string table */
77 luaT_init(L);
78 luaX_init(L);
79 luaS_fix(luaS_newliteral(L, MEMERRMSG));
80 g->GCthreshold = 4*g->totalbytes;
81}
82
83
84static void preinit_state (lua_State *L, global_State *g) {

Callers

nothing calls this directly

Calls 5

stack_initFunction · 0.70
luaH_newFunction · 0.70
luaS_resizeFunction · 0.70
luaT_initFunction · 0.70
luaX_initFunction · 0.70

Tested by

no test coverage detected