Lines Matching refs:item
98 struct util_hash_table_item *item; in util_hash_table_find_iter() local
102 item = (struct util_hash_table_item *)util_hash_iter_data(iter); in util_hash_table_find_iter()
103 if (!ht->compare(item->key, key)) in util_hash_table_find_iter()
116 struct util_hash_table_item *item; in util_hash_table_find_item() local
120 item = (struct util_hash_table_item *)util_hash_iter_data(iter); in util_hash_table_find_item()
121 if (!ht->compare(item->key, key)) in util_hash_table_find_item()
122 return item; in util_hash_table_find_item()
133 struct util_hash_table_item *item; in util_hash_table_set() local
142 item = util_hash_table_find_item(ht, key, key_hash); in util_hash_table_set()
143 if(item) { in util_hash_table_set()
145 item->value = value; in util_hash_table_set()
149 item = malloc(sizeof(struct util_hash_table_item)); in util_hash_table_set()
150 if(!item) in util_hash_table_set()
153 item->key = key; in util_hash_table_set()
154 item->value = value; in util_hash_table_set()
156 iter = util_hash_insert(ht->head, key_hash, item); in util_hash_table_set()
158 free(item); in util_hash_table_set()
166 struct util_hash_table_item *item; in util_hash_table_get() local
174 item = util_hash_table_find_item(ht, key, key_hash); in util_hash_table_get()
175 if(!item) in util_hash_table_get()
178 return item->value; in util_hash_table_get()
185 struct util_hash_table_item *item; in util_hash_table_remove() local
197 item = util_hash_table_item(iter); in util_hash_table_remove()
198 assert(item); in util_hash_table_remove()
199 free(item); in util_hash_table_remove()
207 struct util_hash_table_item *item; in util_hash_table_clear() local
215 item = (struct util_hash_table_item *)util_hash_take(ht->head, util_hash_iter_key(iter)); in util_hash_table_clear()
216 free(item); in util_hash_table_clear()
226 struct util_hash_table_item *item; in util_hash_table_foreach() local
234 item = (struct util_hash_table_item *)util_hash_iter_data(iter); in util_hash_table_foreach()
235 callback(item->key, item->value, data); in util_hash_table_foreach()
243 struct util_hash_table_item *item; in util_hash_table_destroy() local
251 item = (struct util_hash_table_item *)util_hash_iter_data(iter); in util_hash_table_destroy()
252 free(item); in util_hash_table_destroy()