MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / dictAdd

Function dictAdd

src/dict.cpp:606–613  ·  view source on GitHub ↗

Add an element to the target hash table */

Source from the content-addressed store, hash-verified

604
605/* Add an element to the target hash table */
606int dictAdd(dict *d, void *key, void *val, dictEntry **existing)
607{
608 dictEntry *entry = dictAddRaw(d,key,existing);
609
610 if (!entry) return DICT_ERR;
611 dictSetVal(d, entry, val);
612 return DICT_OK;
613}
614
615/* Low level add or find:
616 * This function adds the entry but instead of setting a value returns the

Callers 15

syncDeleteMethod · 0.70
insertMethod · 0.70
ensureMethod · 0.70
trackkeyMethod · 0.70
prefetchKeysAsyncMethod · 0.70
pubsubSubscribeChannelFunction · 0.70
pubsubSubscribePatternFunction · 0.70
cacheKeyMethod · 0.70
latencyAddSampleFunction · 0.70
dictTestFunction · 0.70
clusterAddNodeFunction · 0.70

Calls 1

dictAddRawFunction · 0.85

Tested by

no test coverage detected