MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / preinit_thread

Function preinit_thread

3rd/lua-5.4.3/src/lstate.c:249–266  ·  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

247** any memory (to avoid errors)
248*/
249static void preinit_thread (lua_State *L, global_State *g) {
250 G(L) = g;
251 L->stack = NULL;
252 L->ci = NULL;
253 L->nci = 0;
254 L->twups = L; /* thread has no upvalues */
255 L->nCcalls = 0;
256 L->errorJmp = NULL;
257 L->hook = NULL;
258 L->hookmask = 0;
259 L->basehookcount = 0;
260 L->allowhook = 1;
261 resethookcount(L);
262 L->openupval = NULL;
263 L->status = LUA_OK;
264 L->errfunc = 0;
265 L->oldpc = 0;
266}
267
268
269static 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