Store the specified key into the dictionary, setting its value to the * pointer 'ptr'. If the key was added with success, since it did not * already exist, REDISMODULE_OK is returned. Otherwise if the key already * exists the function returns REDISMODULE_ERR. */
| 6685 | * already exist, REDISMODULE_OK is returned. Otherwise if the key already |
| 6686 | * exists the function returns REDISMODULE_ERR. */ |
| 6687 | int RM_DictSetC(RedisModuleDict *d, void *key, size_t keylen, void *ptr) { |
| 6688 | int retval = raxTryInsert(d->rax,key,keylen,ptr,NULL); |
| 6689 | return (retval == 1) ? REDISMODULE_OK : REDISMODULE_ERR; |
| 6690 | } |
| 6691 | |
| 6692 | /* Like RedisModule_DictSetC() but will replace the key with the new |
| 6693 | * value if the key already exists. */ |
no test coverage detected