| 2106 | } |
| 2107 | |
| 2108 | void zuiClearIterator(zsetopsrc *op) { |
| 2109 | if (op->subject == NULL) |
| 2110 | return; |
| 2111 | |
| 2112 | if (op->type == OBJ_SET) { |
| 2113 | iterset *it = &op->iter.set; |
| 2114 | if (op->encoding == OBJ_ENCODING_INTSET) { |
| 2115 | UNUSED(it); /* skip */ |
| 2116 | } else if (op->encoding == OBJ_ENCODING_HT) { |
| 2117 | dictReleaseIterator(it->ht.di); |
| 2118 | } else { |
| 2119 | serverPanic("Unknown set encoding"); |
| 2120 | } |
| 2121 | } else if (op->type == OBJ_ZSET) { |
| 2122 | iterzset *it = &op->iter.zset; |
| 2123 | if (op->encoding == OBJ_ENCODING_ZIPLIST) { |
| 2124 | UNUSED(it); /* skip */ |
| 2125 | } else if (op->encoding == OBJ_ENCODING_SKIPLIST) { |
| 2126 | UNUSED(it); /* skip */ |
| 2127 | } else { |
| 2128 | serverPanic("Unknown sorted set encoding"); |
| 2129 | } |
| 2130 | } else { |
| 2131 | serverPanic("Unsupported type"); |
| 2132 | } |
| 2133 | } |
| 2134 | |
| 2135 | unsigned long zuiLength(zsetopsrc *op) { |
| 2136 | if (op->subject == NULL) |
no test coverage detected