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

Function RM_DictPrevC

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

This function is exactly 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

6833 * the currently selected element in the iterator, it selects the previous
6834 * element (laxicographically smaller) instead of the next one. */
6835void *RM_DictPrevC(RedisModuleDictIter *di, size_t *keylen, void **dataptr) {
6836 if (!raxPrev(&di->ri)) return NULL;
6837 if (keylen) *keylen = di->ri.key_len;
6838 if (dataptr) *dataptr = di->ri.data;
6839 return di->ri.key;
6840}
6841
6842/* Like RedisModuleNextC(), but instead of returning an internally allocated
6843 * buffer and key length, it returns directly a module string object allocated

Callers 1

RM_DictPrevFunction · 0.85

Calls 1

raxPrevFunction · 0.85

Tested by

no test coverage detected