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

Function RM_DictPrev

app/redis-6.2.6/src/module.c:6859–6864  ·  view source on GitHub ↗

Like RedisModule_DictNext() but after returning the currently selected * element in the iterator, it selects the previous element (laxicographically * smaller) instead of the next one. */

Source from the content-addressed store, hash-verified

6857 * element in the iterator, it selects the previous element (laxicographically
6858 * smaller) instead of the next one. */
6859RedisModuleString *RM_DictPrev(RedisModuleCtx *ctx, RedisModuleDictIter *di, void **dataptr) {
6860 size_t keylen;
6861 void *key = RM_DictPrevC(di,&keylen,dataptr);
6862 if (key == NULL) return NULL;
6863 return RM_CreateString(ctx,key,keylen);
6864}
6865
6866/* Compare the element currently pointed by the iterator to the specified
6867 * element given by key/keylen, according to the operator 'op' (the set of

Callers

nothing calls this directly

Calls 2

RM_DictPrevCFunction · 0.85
RM_CreateStringFunction · 0.85

Tested by

no test coverage detected