Stop a sorted set iteration. */
| 2748 | |
| 2749 | /* Stop a sorted set iteration. */ |
| 2750 | void RM_ZsetRangeStop(RedisModuleKey *key) { |
| 2751 | if (!key->value || key->value->type != OBJ_ZSET) return; |
| 2752 | /* Free resources if needed. */ |
| 2753 | if (key->u.zset.type == REDISMODULE_ZSET_RANGE_LEX) |
| 2754 | zslFreeLexRange(&key->u.zset.lrs); |
| 2755 | /* Setup sensible values so that misused iteration API calls when an |
| 2756 | * iterator is not active will result into something more sensible |
| 2757 | * than crashing. */ |
| 2758 | zsetKeyReset(key); |
| 2759 | } |
| 2760 | |
| 2761 | /* Return the "End of range" flag value to signal the end of the iteration. */ |
| 2762 | int RM_ZsetRangeEndReached(RedisModuleKey *key) { |
no test coverage detected