2.4.2.2 Setup

void zix_hash_free(ZixHash *hash)

Free hash.

ZixHash *zix_hash_new(ZixAllocator *allocator, ZixKeyFunc key_func, ZixHashFunc hash_func, ZixKeyEqualFunc equal_func)

Create a new hash table.

Parameters:
  • allocator – Allocator used for the internal array.

  • key_func – A function to retrieve the key from a record.

  • hash_func – The key hashing function.

  • equal_func – A function to test keys for equality.

size_t zix_hash_size(const ZixHash *hash)

Return the number of elements in the hash.