Stop a sorted set iteration. */
| 2836 | |
| 2837 | /* Stop a sorted set iteration. */ |
| 2838 | void RM_ZsetRangeStop(RedisModuleKey *key) { |
| 2839 | if (!key->value || key->value->type != OBJ_ZSET) return; |
| 2840 | /* Free resources if needed. */ |
| 2841 | if (key->u.zset.type == REDISMODULE_ZSET_RANGE_LEX) |
| 2842 | zslFreeLexRange(&key->u.zset.lrs); |
| 2843 | /* Setup sensible values so that misused iteration API calls when an |
| 2844 | * iterator is not active will result into something more sensible |
| 2845 | * than crashing. */ |
| 2846 | zsetKeyReset(key); |
| 2847 | } |
| 2848 | |
| 2849 | /* Return the "End of range" flag value to signal the end of the iteration. */ |
| 2850 | int RM_ZsetRangeEndReached(RedisModuleKey *key) { |
no test coverage detected