| 851 | } |
| 852 | |
| 853 | LuaInt LuaEngine::tableLength(bool raw, int handleIndex) { |
| 854 | if (raw) { |
| 855 | return lua_rawlen(m_handleThread, handleIndex); |
| 856 | |
| 857 | } else { |
| 858 | lua_checkstack(m_state, 1); |
| 859 | pushHandle(m_state, handleIndex); |
| 860 | lua_len(m_state, -1); |
| 861 | LuaInt len = lua_tointeger(m_state, -1); |
| 862 | lua_pop(m_state, 2); |
| 863 | return len; |
| 864 | } |
| 865 | } |
| 866 | |
| 867 | void LuaEngine::tableIterate(int handleIndex, function<bool(LuaValue key, LuaValue value)> iterator) { |
| 868 | lua_checkstack(m_state, 4); |
no test coverage detected