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

Function ht_destroy

emmy_hook/src/libpe/htable.cpp:200–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void ht_destroy( ht_t *ht )
201{
202 ht_entry_t *entry = NULL,
203 *bucket = NULL;
204 hash_t hash = 0;
205
206 for( hash = 0; hash < HT_N_BUCKETS; ++hash )
207 {
208 entry = ht->buckets[ hash ];
209 while( entry )
210 {
211 ht_entry_t *next = entry->next;
212
213 if( ht->key_free )
214 ht->key_free( entry->key );
215
216 if( ht->val_free )
217 ht->val_free( entry->value );
218
219 free( entry );
220
221 entry = next;
222 }
223 }
224
225 free( ht );
226}
227
228int32_t ht_qword_cmp( void *a, void *b )
229{

Callers 2

peCloseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected