refactor: improve string methods

This commit is contained in:
2025-09-05 21:15:27 +02:00
parent 487afb5d6a
commit be154db6cf
10 changed files with 122 additions and 20 deletions

View File

@@ -51,7 +51,7 @@ int main(void) {
/* This hashmap will contain names as keys and a custom type as value */
size_t key_size = sizeof(char) * MAX_STR_LEN;
size_t value_size = sizeof(int) + sizeof(char) * MAX_STR_LEN;
mcl_hashmap_s *map = mcl_hm_init(my_hash_func, my_equal_fun, my_free_key, my_free_value, key_size, value_size);
mcl_hashmap_s *map = mcl_hm_new(my_hash_func, my_equal_fun, my_free_key, my_free_value, key_size, value_size);
/* Set a new value */
struct my_custom_type p1 = {