feat(hmp): allow the user to specify a callback for dealing with their alloced mem

This commit is contained in:
2025-09-04 15:37:31 -04:00
parent 16470f2592
commit 1c03cac31d
2 changed files with 5 additions and 2 deletions

2
ds.h
View File

@@ -89,7 +89,7 @@ ds_hmp_t *ds_hmp_init(int data_len);
*
* @param hmp pointer to the hashmap
*/
void ds_hmp_free(ds_hmp_t **hmp);
void ds_hmp_free(ds_hmp_t **hmp, void kv_callback(_ds_hmp_kv_t *kv));
/**
* @brief generate a numerical hash from a given string. You shouldn't need to