MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / preinit_thread

Function preinit_thread

third-party/lua-5.5.0/src/lstate.c:225–243  ·  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

223** any memory (to avoid errors)
224*/
225static 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
246lu_mem luaE_threadsize (lua_State *L) {

Callers 2

lua_newthreadFunction · 0.70
lua_newstateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected