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