Like RedisModuleNextC(), but instead of returning an internally allocated * buffer and key length, it returns directly a module string object allocated * in the specified context 'ctx' (that may be NULL exactly like for the main * API RedisModule_CreateString). * * The returned string object should be deallocated after use, either manually * or by using a context that has automatic memory ma
| 7039 | * The returned string object should be deallocated after use, either manually |
| 7040 | * or by using a context that has automatic memory management active. */ |
| 7041 | RedisModuleString *RM_DictNext(RedisModuleCtx *ctx, RedisModuleDictIter *di, void **dataptr) { |
| 7042 | size_t keylen; |
| 7043 | void *key = RM_DictNextC(di,&keylen,dataptr); |
| 7044 | if (key == NULL) return NULL; |
| 7045 | return RM_CreateString(ctx,(const char*)key,keylen); |
| 7046 | } |
| 7047 | |
| 7048 | /* Like RedisModule_DictNext() but after returning the currently selected |
| 7049 | * element in the iterator, it selects the previous element (laxicographically |
nothing calls this directly
no test coverage detected