From ldblib.c (getthread)
| 334 | |
| 335 | // From ldblib.c (getthread) |
| 336 | static lua_State* GetLuaThread(lua_State *L, int *arg) |
| 337 | { |
| 338 | if (lua_isthread(L, 1)) { |
| 339 | *arg = 1; |
| 340 | return lua_tothread(L, 1); |
| 341 | } |
| 342 | else { |
| 343 | *arg = 0; |
| 344 | return L; |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | // From https://zeux.io/2010/11/07/lua-callstack-with-c-debugger/ |
| 349 | // and also |
no test coverage detected