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

Function getthread

third-party/lua-5.5.0/src/ldblib.c:95–104  ·  view source on GitHub ↗

** Auxiliary function used by several library functions: check for ** an optional thread as function's first argument and set 'arg' with ** 1 if this argument is present (so that functions can skip it to ** access their other arguments) */

Source from the content-addressed store, hash-verified

93** access their other arguments)
94*/
95static lua_State *getthread (lua_State *L, int *arg) {
96 if (lua_isthread(L, 1)) {
97 *arg = 1;
98 return lua_tothread(L, 1);
99 }
100 else {
101 *arg = 0;
102 return L; /* function will operate over current thread */
103 }
104}
105
106
107/*

Callers 6

db_getinfoFunction · 0.70
db_getlocalFunction · 0.70
db_setlocalFunction · 0.70
db_sethookFunction · 0.70
db_gethookFunction · 0.70
db_tracebackFunction · 0.70

Calls 1

lua_tothreadFunction · 0.70

Tested by

no test coverage detected