| 1042 | |
| 1043 | |
| 1044 | static int tisarray (lua_State *L) { |
| 1045 | luaL_checktype(L, 1, LUA_TTABLE); |
| 1046 | if (const auto n = isIndexBasedTable(L, 1)) { |
| 1047 | for (lua_Integer k = 1; k != n; ++k) { |
| 1048 | if (l_unlikely(lua_geti(L, 1, k) == LUA_TNIL)) { |
| 1049 | lua_pop(L, 1); |
| 1050 | lua_pushboolean(L, false); |
| 1051 | return 1; |
| 1052 | } |
| 1053 | lua_pop(L, 1); |
| 1054 | } |
| 1055 | lua_pushboolean(L, true); |
| 1056 | } |
| 1057 | else lua_pushboolean(L, false); |
| 1058 | return 1; |
| 1059 | } |
| 1060 | |
| 1061 | |
| 1062 | /* }====================================================== */ |
nothing calls this directly
no test coverage detected