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