renamed some collection functions
This commit is contained in:
@@ -12,7 +12,8 @@ static const Array(u32) __HashMap_heights = ARRAY(u32, {
|
||||
8388617, 16777213, 33554467, 67108859, 134217757, 268435493
|
||||
});
|
||||
|
||||
void HashMap_create(HashMap_* ptr, u32 value_t_size, FreeFunction NULLABLE(value_destructor)){
|
||||
|
||||
void HashMap_create_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;
|
||||
|
||||
@@ -7,7 +7,7 @@ List_ List_alloc_size(u32 initial_size){
|
||||
return List_construct_size(malloc(allocated_size), 0, allocated_size);
|
||||
}
|
||||
|
||||
void* List_expand(List_* ptr, u32 expansion_size){
|
||||
void* List_expand_size(List_* ptr, u32 expansion_size){
|
||||
u32 occupied_size = ptr->size;
|
||||
u32 expanded_alloc_size = ptr->allocated_size;
|
||||
if(expanded_alloc_size == 0)
|
||||
@@ -23,7 +23,7 @@ void* List_expand(List_* ptr, u32 expansion_size){
|
||||
}
|
||||
|
||||
void List_push_size(List_* ptr, void* values, u32 size){
|
||||
void* empty_cell_ptr = List_expand(ptr, size);
|
||||
void* empty_cell_ptr = List_expand_size(ptr, size);
|
||||
memcpy(empty_cell_ptr, values, size);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user