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

Function dictAdd

app/redis-6.2.6/src/dict.c:292–299  ·  view source on GitHub ↗

Add an element to the target hash table */

Source from the content-addressed store, hash-verified

290
291/* Add an element to the target hash table */
292int dictAdd(dict *d, void *key, void *val)
293{
294 dictEntry *entry = dictAddRaw(d,key,NULL);
295
296 if (!entry) return DICT_ERR;
297 dictSetVal(d, entry, val);
298 return DICT_OK;
299}
300
301/* Low level add or find:
302 * This function adds the entry but instead of setting a value returns the

Callers 15

dictTestFunction · 0.70
typeinfo_addFunction · 0.70
luaCreateFunctionFunction · 0.70
blockForKeysFunction · 0.70
signalKeyAsReadyFunction · 0.70
pubsubSubscribeChannelFunction · 0.70
pubsubSubscribePatternFunction · 0.70

Calls 1

dictAddRawFunction · 0.85

Tested by

no test coverage detected