Lines Matching refs:entry

85     lexbor_bst_map_entry_t *entry;  in lexbor_bst_map_search()  local
96 entry = bst_entry->value; in lexbor_bst_map_search()
98 if (entry->str.length == key_len && in lexbor_bst_map_search()
99 lexbor_str_data_cmp(entry->str.data, key)) in lexbor_bst_map_search()
101 return entry; in lexbor_bst_map_search()
116 lexbor_bst_map_entry_t *entry; in lexbor_bst_map_insert() local
118 entry = lexbor_bst_map_insert_not_exists(bst_map, scope, key, key_len); in lexbor_bst_map_insert()
119 if (entry == NULL) { in lexbor_bst_map_insert()
123 entry->value = value; in lexbor_bst_map_insert()
125 return entry; in lexbor_bst_map_insert()
133 lexbor_bst_map_entry_t *entry; in lexbor_bst_map_insert_not_exists() local
148 entry = bst_entry->value; in lexbor_bst_map_insert_not_exists()
150 if (entry->str.length == key_len && in lexbor_bst_map_insert_not_exists()
151 lexbor_str_data_cmp(entry->str.data, key)) in lexbor_bst_map_insert_not_exists()
153 return entry; in lexbor_bst_map_insert_not_exists()
175 entry = lexbor_dobject_calloc(bst_map->entries); in lexbor_bst_map_insert_not_exists()
176 if (entry == NULL) { in lexbor_bst_map_insert_not_exists()
180 lexbor_str_init(&entry->str, bst_map->mraw, key_len); in lexbor_bst_map_insert_not_exists()
181 if (entry->str.data == NULL) { in lexbor_bst_map_insert_not_exists()
182 lexbor_dobject_free(bst_map->entries, entry); in lexbor_bst_map_insert_not_exists()
187 lexbor_str_append(&entry->str, bst_map->mraw, key, key_len); in lexbor_bst_map_insert_not_exists()
189 bst_entry->value = entry; in lexbor_bst_map_insert_not_exists()
191 return entry; in lexbor_bst_map_insert_not_exists()
198 lexbor_bst_map_entry_t *entry; in lexbor_bst_map_remove() local
209 entry = bst_entry->value; in lexbor_bst_map_remove()
211 if (entry->str.length == key_len && in lexbor_bst_map_remove()
212 lexbor_str_data_cmp(entry->str.data, key)) in lexbor_bst_map_remove()
214 void *value = entry->value; in lexbor_bst_map_remove()
218 lexbor_str_destroy(&entry->str, bst_map->mraw, false); in lexbor_bst_map_remove()
219 lexbor_dobject_free(bst_map->entries, entry); in lexbor_bst_map_remove()