#ifndef HASHMAP_H
#define HASHMAP_H

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

typedef struct hashmap hashmap;

hashmap *hashmap_new(void);             /* new empty map, capacity 16 */
void     hashmap_free(hashmap *m);      /* release all memory */

bool   hashmap_insert(hashmap *m, int64_t key, int64_t value);
bool   hashmap_get(const hashmap *m, int64_t key, int64_t *value);
bool   hashmap_remove(hashmap *m, int64_t key);
size_t hashmap_scan(const hashmap *m, int64_t *out_keys, int64_t *out_vals);
size_t hashmap_len(const hashmap *m);
size_t hashmap_capacity(const hashmap *m);

#endif /* HASHMAP_H */
