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

Function getthread

third-party/lua-5.3.5/src/ldblib.c:90–99  ·  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

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

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