| 10045 | } |
| 10046 | |
| 10047 | inline void coroutine_create_guard(lua_State* L) { |
| 10048 | if (is_main_thread(L)) { |
| 10049 | return; |
| 10050 | } |
| 10051 | int stacksize = lua_gettop(L); |
| 10052 | if (stacksize < 1) { |
| 10053 | return; |
| 10054 | } |
| 10055 | if (type_of(L, 1) != type::function) { |
| 10056 | return; |
| 10057 | } |
| 10058 | // well now we're screwed... |
| 10059 | // we can clean the stack and pray it doesn't destroy anything? |
| 10060 | lua_pop(L, stacksize); |
| 10061 | } |
| 10062 | |
| 10063 | inline void clear(lua_State* L, int table_index) { |
| 10064 | lua_pushnil(L); |
nothing calls this directly
no test coverage detected