|
// emptyif (lua_next(L, t))lua_pushnil(L); // nil key// table is on stack at index tIn Lua a good way to check if a table t is empty is to check if next(t) == nil.What is the best way to check if a table is empty using the C API? Is it basically the same technique?
{// not emptylua_pop(L, 2);}else
{}Or is there a better way?