** open parts that may cause memory-allocation errors */
| 8983 | ** open parts that may cause memory-allocation errors |
| 8984 | */ |
| 8985 | static void f_luaopen (lua_State *L, void *ud) { |
| 8986 | global_State *g = G(L); |
| 8987 | UNUSED(ud); |
| 8988 | stack_init(L, L); /* init stack */ |
| 8989 | sethvalue(L, gt(L), luaH_new(L, 0, 2)); /* table of globals */ |
| 8990 | sethvalue(L, registry(L), luaH_new(L, 0, 2)); /* registry */ |
| 8991 | luaS_resize(L, MINSTRTABSIZE); /* initial size of string table */ |
| 8992 | luaT_init(L); |
| 8993 | luaX_init(L); |
| 8994 | luaS_fix(luaS_newliteral(L, MEMERRMSG)); |
| 8995 | g->GCthreshold = 4*g->totalbytes; |
| 8996 | } |
| 8997 | |
| 8998 | |
| 8999 | static void preinit_state (lua_State *L, global_State *g) { |
nothing calls this directly
no test coverage detected