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. */
| 6833 | * the currently selected element in the iterator, it selects the previous |
| 6834 | * element (laxicographically smaller) instead of the next one. */ |
| 6835 | void *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 |
no test coverage detected