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. */
| 6877 | * already exist, REDISMODULE_OK is returned. Otherwise if the key already |
| 6878 | * exists the function returns REDISMODULE_ERR. */ |
| 6879 | int RM_DictSetC(RedisModuleDict *d, void *key, size_t keylen, void *ptr) { |
| 6880 | int retval = raxTryInsert(d->rax,(unsigned char*)key,keylen,ptr,NULL); |
| 6881 | return (retval == 1) ? REDISMODULE_OK : REDISMODULE_ERR; |
| 6882 | } |
| 6883 | |
| 6884 | /* Like RedisModule_DictSetC() but will replace the key with the new |
| 6885 | * value if the key already exists. */ |
no test coverage detected