hashmap_get

This commit is contained in:
2020-08-07 12:48:41 +02:00
parent 064885298f
commit bb988bbef1
2 changed files with 19 additions and 10 deletions

View File

@ -2,7 +2,7 @@
#define _acl_hashmap_h
#include <stddef.h>
#include <stdbool.h>
#define acl_hashmap_create(type, keyType, bucketCount) acl_hashmap_init(bucketCount, sizeof(struct{type c; type d;}), offsetof(struct{type c; type d;}, d), sizeof(keyType));
#define acl_hashmap_create(type, keyType, bucketCount) acl_hashmap_init(bucketCount, sizeof(struct{keyType c; type d;}), offsetof(struct{keyType c; type d;}, d), sizeof(keyType))
union acl_hashmap_meta {
void *dummy_ptr;
struct {
@ -13,5 +13,6 @@ union acl_hashmap_meta {
};
};
union acl_hashmap_meta* acl_hashmap_init(size_t bucketCount, size_t sizeOneElement, size_t offset, size_t keySize);
void* acl_hashmap_put(union acl_hashmap_meta *hashmap_meta, void *key);
void* acl_hashmap_declare(union acl_hashmap_meta *hashmap_meta, void *key);
void* acl_hashmap_get(union acl_hashmap_meta *hashmap_meta, void *key);
#endif