feat(lua): add missing changes to autocmds lost in the rebase

Note: some of these changes are breaking, like change of API signatures
This commit is contained in:
TJ DeVries
2021-05-28 15:45:34 -04:00
committed by bfredl
parent 6732cd9e57
commit 0f613482b3
10 changed files with 389 additions and 229 deletions

View File

@@ -1354,6 +1354,9 @@ bool nlua_ref_is_function(LuaRef ref)
{
lua_State *const lstate = global_lstate;
nlua_pushref(lstate, ref);
// TODO(tjdevries): This should probably check for callable tables as well.
// We should put some work maybe into simplifying how all of that works
bool is_function = (lua_type(lstate, -1) == LUA_TFUNCTION);
lua_pop(lstate, 1);