Add lh_table_delete_entry_to_tail() and array_list_set_idx() functions.

This commit is contained in:
Eric Hawicz
2026-04-24 12:55:46 -04:00
parent 52ddfb35f1
commit fe30bc7e66
5 changed files with 39 additions and 0 deletions

View File

@@ -303,6 +303,17 @@ extern json_bool lh_table_lookup_ex(struct lh_table *t, const void *k, void **v)
*/
extern int lh_table_delete_entry(struct lh_table *t, struct lh_entry *e);
/**
* Delete all entries from the specified one to the tail of the list.
* Same as calling lh_table_delete_entry() on each of them.
*
* @param t the table to delete from.
* @param e a pointer to the first entry to delete.
* @return 0 if the item was deleted.
* @return -1 if it was not found.
*/
extern int lh_table_delete_entry_to_tail(struct lh_table *t, struct lh_entry *e);
/**
* Delete a record from the table.
*