MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zuiClearIterator

Function zuiClearIterator

app/redis-6.2.6/src/t_zset.c:2108–2133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2106}
2107
2108void 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
2135unsigned long zuiLength(zsetopsrc *op) {
2136 if (op->subject == NULL)

Callers 3

zdiffAlgorithm1Function · 0.85
zdiffAlgorithm2Function · 0.85

Calls 1

dictReleaseIteratorFunction · 0.70

Tested by

no test coverage detected