MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / HashTableAddOrFind

Function HashTableAddOrFind

src/util/dict.c:466–470  ·  view source on GitHub ↗

Add or Find: * HashTableAddOrFind() is simply a version of HashTableAddRaw() that always * returns the hash entry of the specified key, even if the key already * exists and can't be added (in that case the entry of the already * existing key is returned.) * * See HashTableAddRaw() for more information. */

Source from the content-addressed store, hash-verified

464 *
465 * See HashTableAddRaw() for more information. */
466dictEntry *HashTableAddOrFind(dict *d, void *key) {
467 dictEntry *entry, *existing;
468 entry = HashTableAddRaw(d,key,&existing);
469 return entry ? entry : existing;
470}
471
472/* Search and remove an element. This is a helper function for
473 * HashTableDelete() and HashTableUnlink(), please check the top comment

Callers

nothing calls this directly

Calls 1

HashTableAddRawFunction · 0.85

Tested by

no test coverage detected