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. */
| 7025 | * the currently selected element in the iterator, it selects the previous |
| 7026 | * element (laxicographically smaller) instead of the next one. */ |
| 7027 | void *RM_DictPrevC(RedisModuleDictIter *di, size_t *keylen, void **dataptr) { |
| 7028 | if (!raxPrev(&di->ri)) return NULL; |
| 7029 | if (keylen) *keylen = di->ri.key_len; |
| 7030 | if (dataptr) *dataptr = di->ri.data; |
| 7031 | return di->ri.key; |
| 7032 | } |
| 7033 | |
| 7034 | /* Like RedisModuleNextC(), but instead of returning an internally allocated |
| 7035 | * buffer and key length, it returns directly a module string object allocated |
no test coverage detected