Associative arrays/Creation/C: Difference between revisions
Content deleted Content added
→From Scratch: more values |
→From Scratch: remove hash_free function |
||
Line 19: | Line 19: | ||
hash->values = calloc(size, sizeof (void *)); |
hash->values = calloc(size, sizeof (void *)); |
||
return hash; |
return hash; |
||
} |
|||
void hash_free (Hash *hash) { |
|||
free(hash->keys); |
|||
free(hash->values); |
|||
free(hash); |
|||
} |
} |
||