This repository has been archived on 2026-04-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
bhlib-old/include/bh/internal/hashmap.h

31 lines
595 B
C
Raw Normal View History

2024-04-13 14:52:29 +03:00
#ifndef BHLIB_INTERNAL_HASHMAP_H
#define BHLIB_INTERNAL_HASHMAP_H
#include <bh/hashmap.h>
typedef struct bh_hashmap_node_s
{
void *key;
void *value;
} bh_hashmap_node_t;
struct bh_hashmap_s
{
bh_hashmap_node_t *data;
size_t *psls;
size_t size;
size_t capacity;
size_t threshold;
bh_equal_cb_t equal;
bh_hash_cb_t hash;
float factor;
};
void bh_hashmap_init(bh_hashmap_t *hashmap,
bh_equal_cb_t equal,
bh_hash_cb_t hash);
void bh_hashmap_destroy(bh_hashmap_t *hashmap);
#endif /* BHLIB_INTERNAL_HASHMAP_H */