MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / preinit_thread

Function preinit_thread

extlibs/lua/src/lstate.c:281–297  ·  view source on GitHub ↗

** preinitialize a thread with consistent values without allocating ** any memory (to avoid errors) */

Source from the content-addressed store, hash-verified

279** any memory (to avoid errors)
280*/
281static void preinit_thread (lua_State *L, global_State *g) {
282 G(L) = g;
283 L->stack = NULL;
284 L->ci = NULL;
285 L->nci = 0;
286 L->stacksize = 0;
287 L->twups = L; /* thread has no upvalues */
288 L->errorJmp = NULL;
289 L->hook = NULL;
290 L->hookmask = 0;
291 L->basehookcount = 0;
292 L->allowhook = 1;
293 resethookcount(L);
294 L->openupval = NULL;
295 L->status = LUA_OK;
296 L->errfunc = 0;
297}
298
299
300static void close_state (lua_State *L) {

Callers 2

lua_newthreadFunction · 0.85
lua_newstateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected