MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / getthread

Function getthread

src/Chain/libraries/glua/ldblib.cpp:89–98  ·  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

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

Callers 6

db_getinfoFunction · 0.85
db_getlocalFunction · 0.85
db_setlocalFunction · 0.85
db_sethookFunction · 0.85
db_gethookFunction · 0.85
db_tracebackFunction · 0.85

Calls 1

lua_tothreadFunction · 0.85

Tested by

no test coverage detected