Lines Matching refs:hn
119 struct hash_node *hn = (struct hash_node *) node; in get_node() local
121 if ((*ht->compare)(hn->key, key) == 0) { in get_node()
122 return hn; in get_node()
132 struct hash_node *hn = get_node(ht, key); in hash_table_find() local
134 return (hn == NULL) ? NULL : hn->data; in hash_table_find()
158 struct hash_node *hn; in hash_table_replace() local
161 hn = (struct hash_node *) node; in hash_table_replace()
163 if ((*ht->compare)(hn->key, key) == 0) { in hash_table_replace()
164 hn->data = data; in hash_table_replace()
169 hn = calloc(1, sizeof(*hn)); in hash_table_replace()
171 hn->data = data; in hash_table_replace()
172 hn->key = key; in hash_table_replace()
174 insert_at_head(& ht->buckets[bucket], & hn->link); in hash_table_replace()
201 struct hash_node *hn = (struct hash_node *) node; in hash_table_call_foreach() local
203 callback(hn->key, hn->data, closure); in hash_table_call_foreach()