2024-05-08 22:07:31 +00:00
|
|
|
#pragma once
|
|
|
|
#include "fumocommon.h"
|
|
|
|
|
|
|
|
|
|
|
|
struct Dictionary {
|
2024-05-15 22:10:47 +00:00
|
|
|
usize value_size;
|
|
|
|
usize value_offset;
|
|
|
|
usize bkt_size;
|
|
|
|
|
2024-05-08 22:07:31 +00:00
|
|
|
usize filled;
|
|
|
|
usize capacity;
|
|
|
|
void *bkts;
|
|
|
|
};
|
|
|
|
|
2024-05-15 22:10:47 +00:00
|
|
|
bool CreateDictionary(struct Dictionary *dict, usize value_size);
|
2024-05-08 22:07:31 +00:00
|
|
|
|
|
|
|
void FreeDictionary(struct Dictionary *dict);
|
|
|
|
|
2024-05-15 22:10:47 +00:00
|
|
|
void *DictionaryFind(struct Dictionary *dict, u32 key);
|
2024-05-08 22:07:31 +00:00
|
|
|
|
2024-05-15 22:10:47 +00:00
|
|
|
void *DictionarySet(struct Dictionary *dict, u32 key, void *value_ptr);
|