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