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

Function RM_DictNextC

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

Return the current item of the dictionary iterator `di` and steps to the * next element. If the iterator already yield the last element and there * are no other elements to return, NULL is returned, otherwise a pointer * to a string representing the key is provided, and the `*keylen` length * is set by reference (if keylen is not NULL). The `*dataptr`, if not NULL * is set to the value of the

Source from the content-addressed store, hash-verified

6823 * next/prev iterator step. Also the pointer is no longer valid once the
6824 * iterator is released. */
6825void *RM_DictNextC(RedisModuleDictIter *di, size_t *keylen, void **dataptr) {
6826 if (!raxNext(&di->ri)) return NULL;
6827 if (keylen) *keylen = di->ri.key_len;
6828 if (dataptr) *dataptr = di->ri.data;
6829 return di->ri.key;
6830}
6831
6832/* This function is exactly like RedisModule_DictNext() but after returning
6833 * the currently selected element in the iterator, it selects the previous

Callers 1

RM_DictNextFunction · 0.85

Calls 1

raxNextFunction · 0.85

Tested by

no test coverage detected