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