Associative arrays/Creation/C: Difference between revisions

→‎From Scratch: remove hash_free function
(→‎From Scratch: more values)
(→‎From Scratch: remove hash_free function)
Line 19:
hash->values = calloc(size, sizeof (void *));
return hash;
}
 
void hash_free (Hash *hash) {
free(hash->keys);
free(hash->values);
free(hash);
}
 
Anonymous user