Like RedisModule_DictSetC() but will replace the key with the new * value if the key already exists. */
| 6692 | /* Like RedisModule_DictSetC() but will replace the key with the new |
| 6693 | * value if the key already exists. */ |
| 6694 | int RM_DictReplaceC(RedisModuleDict *d, void *key, size_t keylen, void *ptr) { |
| 6695 | int retval = raxInsert(d->rax,key,keylen,ptr,NULL); |
| 6696 | return (retval == 1) ? REDISMODULE_OK : REDISMODULE_ERR; |
| 6697 | } |
| 6698 | |
| 6699 | /* Like RedisModule_DictSetC() but takes the key as a RedisModuleString. */ |
| 6700 | int RM_DictSet(RedisModuleDict *d, RedisModuleString *key, void *ptr) { |
no test coverage detected