Lines Matching refs:hash_map_entry
121 hash_map_entry_t *hash_map_entry = find_bucket_entry_(hash_bucket_list, key); in hash_map_has_key() local
122 return (hash_map_entry != NULL); in hash_map_has_key()
138 hash_map_entry_t *hash_map_entry = find_bucket_entry_(hash_bucket_list, key); in hash_map_set() local
140 if (hash_map_entry) { in hash_map_set()
142 UNUSED_ATTR bool rc = list_remove(hash_bucket_list, hash_map_entry); in hash_map_set()
147 hash_map_entry = hash_map->allocator->alloc(sizeof(hash_map_entry_t)); in hash_map_set()
148 if (hash_map_entry == NULL) in hash_map_set()
151 hash_map_entry->key = key; in hash_map_set()
152 hash_map_entry->data = data; in hash_map_set()
153 hash_map_entry->hash_map = hash_map; in hash_map_set()
155 return list_append(hash_bucket_list, hash_map_entry); in hash_map_set()
164 hash_map_entry_t *hash_map_entry = find_bucket_entry_(hash_bucket_list, key); in hash_map_erase() local
165 if (hash_map_entry == NULL) { in hash_map_erase()
171 return list_remove(hash_bucket_list, hash_map_entry); in hash_map_erase()
180 hash_map_entry_t *hash_map_entry = find_bucket_entry_(hash_bucket_list, key); in hash_map_get() local
181 if (hash_map_entry != NULL) in hash_map_get()
182 return hash_map_entry->data; in hash_map_get()
208 hash_map_entry_t *hash_map_entry = (hash_map_entry_t *)list_node(iter); in hash_map_foreach() local
209 if (!callback(hash_map_entry, context)) in hash_map_foreach()
217 hash_map_entry_t *hash_map_entry = (hash_map_entry_t *)data; in bucket_free_() local
218 const hash_map_t *hash_map = hash_map_entry->hash_map; in bucket_free_()
221 hash_map->key_fn((void *)hash_map_entry->key); in bucket_free_()
223 hash_map->data_fn(hash_map_entry->data); in bucket_free_()
224 hash_map->allocator->free(hash_map_entry); in bucket_free_()
236 hash_map_entry_t *hash_map_entry = (hash_map_entry_t *)list_node(iter); in find_bucket_entry_() local
237 if (hash_map_entry->hash_map->keys_are_equal(hash_map_entry->key, key)) { in find_bucket_entry_()
238 return hash_map_entry; in find_bucket_entry_()