** open parts of the state that may cause memory-allocation errors. */
| 212 | ** open parts of the state that may cause memory-allocation errors. |
| 213 | */ |
| 214 | static void f_luaopen (lua_State *L, void *ud) { |
| 215 | global_State *g = G(L); |
| 216 | UNUSED(ud); |
| 217 | stack_init(L, L); /* init stack */ |
| 218 | init_registry(L, g); |
| 219 | luaS_init(L); |
| 220 | luaT_init(L); |
| 221 | luaX_init(L); |
| 222 | g->gcstp = 0; /* allow gc */ |
| 223 | setnilvalue(&g->nilvalue); /* now state is complete */ |
| 224 | #ifndef PLUTO_NO_DEFAULT_TABLE_METATABLE |
| 225 | setnilvalue(&g->table_mt); |
| 226 | #endif |
| 227 | luai_userstateopen(L); |
| 228 | } |
| 229 | |
| 230 | |
| 231 | /* |
nothing calls this directly
no test coverage detected