MCPcopy Create free account
hub / github.com/audacity/audacity / idxHashFind

Function idxHashFind

lib-src/sqlite/shell.c:8624–8636  ·  view source on GitHub ↗

** If zKey/nKey is present in the hash table, return a pointer to the ** hash-entry object. */

Source from the content-addressed store, hash-verified

8622** hash-entry object.
8623*/
8624static IdxHashEntry *idxHashFind(IdxHash *pHash, const char *zKey, int nKey){
8625 int iHash;
8626 IdxHashEntry *pEntry;
8627 if( nKey<0 ) nKey = STRLEN(zKey);
8628 iHash = idxHashString(zKey, nKey);
8629 assert( iHash>=0 );
8630 for(pEntry=pHash->aHash[iHash]; pEntry; pEntry=pEntry->pHashNext){
8631 if( STRLEN(pEntry->zKey)==nKey && 0==memcmp(pEntry->zKey, zKey, nKey) ){
8632 return pEntry;
8633 }
8634 }
8635 return 0;
8636}
8637
8638/*
8639** If the hash table contains an entry with a key equal to the string

Callers 2

idxHashSearchFunction · 0.85
idxPopulateOneStat1Function · 0.85

Calls 1

idxHashStringFunction · 0.85

Tested by

no test coverage detected