Skip to content

Commit

Permalink
rename zset to iterzset (#706)
Browse files Browse the repository at this point in the history
Co-authored-by: Michiel De Witte <[email protected]>
  • Loading branch information
michieldwitte and Michiel De Witte authored Sep 29, 2023
1 parent 57f4a2e commit a0f280e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/t_zset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,7 @@ struct zsetopsrc {
zset *zs;
zskiplistNode *node;
} sl;
} zset;
} iterzset;
} iter;
};

Expand Down Expand Up @@ -2085,7 +2085,7 @@ void zuiInitIterator(zsetopsrc *op) {
/* Sorted sets are traversed in reverse order to optimize for
* the insertion of the elements in a new list as in
* ZDIFF/ZINTER/ZUNION */
iterzset *it = (iterzset*)&op->iter.zset;
iterzset *it = (iterzset*)&op->iter.iterzset;
if (op->encoding == OBJ_ENCODING_ZIPLIST) {
it->zl.zl = (unsigned char*)op->subject->m_ptr;
it->zl.eptr = ziplistIndex(it->zl.zl,-2);
Expand Down Expand Up @@ -2118,7 +2118,7 @@ void zuiClearIterator(zsetopsrc *op) {
serverPanic("Unknown set encoding");
}
} else if (op->type == OBJ_ZSET) {
iterzset *it = &op->iter.zset;
iterzset *it = &op->iter.iterzset;
if (op->encoding == OBJ_ENCODING_ZIPLIST) {
UNUSED(it); /* skip */
} else if (op->encoding == OBJ_ENCODING_SKIPLIST) {
Expand Down Expand Up @@ -2194,7 +2194,7 @@ int zuiNext(zsetopsrc *op, zsetopval *val) {
serverPanic("Unknown set encoding");
}
} else if (op->type == OBJ_ZSET) {
iterzset *it = &op->iter.zset;
iterzset *it = &op->iter.iterzset;
if (op->encoding == OBJ_ENCODING_ZIPLIST) {
/* No need to check both, but better be explicit. */
if (it->zl.eptr == NULL || it->zl.sptr == NULL)
Expand Down

0 comments on commit a0f280e

Please sign in to comment.