renamed sosme HashMap methods

This commit is contained in:
2025-07-24 18:08:09 +03:00
parent 51980ebb0b
commit 03bebea4b2
2 changed files with 4 additions and 4 deletions

View File

@@ -13,10 +13,11 @@ static const Array(u32) __HashMap_heights = ARRAY(u32, {
});
void HashMap_create_size(HashMap_* ptr, u32 value_t_size, FreeFunction NULLABLE(value_destructor)){
void HashMap_construct_size(HashMap_* ptr, u32 value_t_size, FreeFunction NULLABLE(value_destructor)){
ptr->value_t_size = value_t_size;
ptr->value_destructor = value_destructor;
ptr->height_n = 0;
//TODO: make first height == 0 and call malloc later
ptr->height = ((u32*)__HashMap_heights.data)[0];
u32 alloc_size = ptr->height * sizeof(HashMapBucket);
ptr->table = (HashMapBucket*)malloc(alloc_size);