** preinitialize a thread with consistent values without allocating ** any memory (to avoid errors) */
| 222 | ** any memory (to avoid errors) |
| 223 | */ |
| 224 | static void preinit_thread(lua_State *L, global_State *g) { |
| 225 | G(L) = g; |
| 226 | L->stack = nullptr; |
| 227 | L->ci = nullptr; |
| 228 | L->nci = 0; |
| 229 | L->stacksize = 0; |
| 230 | L->twups = L; /* thread has no upvalues */ |
| 231 | L->errorJmp = nullptr; |
| 232 | L->nCcalls = 0; |
| 233 | L->hook = nullptr; |
| 234 | L->hookmask = 0; |
| 235 | L->basehookcount = 0; |
| 236 | L->allowhook = 1; |
| 237 | resethookcount(L); |
| 238 | L->openupval = nullptr; |
| 239 | L->nny = 1; |
| 240 | L->status = LUA_OK; |
| 241 | L->errfunc = 0; |
| 242 | } |
| 243 | |
| 244 | |
| 245 | static void close_state(lua_State *L) { |
no outgoing calls
no test coverage detected