** open parts of the state that may cause memory-allocation errors. ** ('g->version' != NULL flags that the state was completely build) */
| 198 | ** ('g->version' != NULL flags that the state was completely build) |
| 199 | */ |
| 200 | static void f_luaopen (lua_State *L, void *ud) { |
| 201 | global_State *g = G(L); |
| 202 | UNUSED(ud); |
| 203 | stack_init(L, L); /* init stack */ |
| 204 | init_registry(L, g); |
| 205 | luaS_init(L); |
| 206 | luaT_init(L); |
| 207 | luaX_init(L); |
| 208 | g->gcrunning = 1; /* allow gc */ |
| 209 | g->version = lua_version(NULL); |
| 210 | luai_userstateopen(L); |
| 211 | } |
| 212 | |
| 213 | |
| 214 | /* |
nothing calls this directly
no test coverage detected