| 107 | } |
| 108 | |
| 109 | void *cbm_ht_delete(CBMHashTable *ht, const char *key) { |
| 110 | if (!ht || !key) |
| 111 | return NULL; |
| 112 | cbm_vt_itr itr = cbm_vt_get(&ht->vt, key); |
| 113 | if (cbm_vt_is_end(itr)) |
| 114 | return NULL; |
| 115 | void *prev = itr.data->val; |
| 116 | (void)cbm_vt_erase(&ht->vt, key); |
| 117 | return prev; |
| 118 | } |
| 119 | |
| 120 | uint32_t cbm_ht_count(const CBMHashTable *ht) { |
| 121 | if (!ht) |
no outgoing calls
no test coverage detected