MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / ht_get

Function ht_get

emmy_hook/src/libpe/htable.cpp:91–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void *ht_get( ht_t *ht, void *key )
92{
93 if( ht && key )
94 {
95 hash_t hash = ( ht->key_hash ? ht->key_hash( key ) % HT_N_BUCKETS : (uint32_t)key % HT_N_BUCKETS );
96 ht_entry_t *entry = NULL,
97 *bucket = NULL;
98
99 bucket = ht->buckets[ hash ];
100
101 for( entry = bucket; entry; entry = entry->next )
102 {
103 if( ht->key_cmp( key, entry->key ) == 0 )
104 {
105 return entry->value;
106 }
107 }
108 }
109
110 return NULL;
111}
112
113bool ht_first( ht_t *ht, ht_iterator_t *iter )
114{

Callers 7

peExtractStringsFunction · 0.85
peParseImportTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected