Lines Matching refs:item
102 struct util_hash_table_item *item; in util_hash_table_find_iter() local
106 item = (struct util_hash_table_item *)util_hash_iter_data(iter); in util_hash_table_find_iter()
107 if (!ht->compare(item->key, key)) in util_hash_table_find_iter()
120 struct util_hash_table_item *item; in util_hash_table_find_item() local
124 item = (struct util_hash_table_item *)util_hash_iter_data(iter); in util_hash_table_find_item()
125 if (!ht->compare(item->key, key)) in util_hash_table_find_item()
126 return item; in util_hash_table_find_item()
137 struct util_hash_table_item *item; in util_hash_table_set() local
146 item = util_hash_table_find_item(ht, key, key_hash); in util_hash_table_set()
147 if(item) { in util_hash_table_set()
149 item->value = value; in util_hash_table_set()
153 item = malloc(sizeof(struct util_hash_table_item)); in util_hash_table_set()
154 if(!item) in util_hash_table_set()
157 item->key = key; in util_hash_table_set()
158 item->value = value; in util_hash_table_set()
160 iter = util_hash_insert(ht->head, key_hash, item); in util_hash_table_set()
162 free(item); in util_hash_table_set()
170 struct util_hash_table_item *item; in util_hash_table_get() local
178 item = util_hash_table_find_item(ht, key, key_hash); in util_hash_table_get()
179 if(!item) in util_hash_table_get()
182 return item->value; in util_hash_table_get()
189 struct util_hash_table_item *item; in util_hash_table_remove() local
201 item = util_hash_table_item(iter); in util_hash_table_remove()
202 assert(item); in util_hash_table_remove()
203 free(item); in util_hash_table_remove()
211 struct util_hash_table_item *item; in util_hash_table_clear() local
219 item = (struct util_hash_table_item *)util_hash_take(ht->head, util_hash_iter_key(iter)); in util_hash_table_clear()
220 free(item); in util_hash_table_clear()
230 struct util_hash_table_item *item; in util_hash_table_foreach() local
238 item = (struct util_hash_table_item *)util_hash_iter_data(iter); in util_hash_table_foreach()
239 callback(item->key, item->value, data); in util_hash_table_foreach()
247 struct util_hash_table_item *item; in util_hash_table_destroy() local
255 item = (struct util_hash_table_item *)util_hash_iter_data(iter); in util_hash_table_destroy()
256 free(item); in util_hash_table_destroy()