data_structures
Functions
hashmap_new.c File Reference
#include "hashmap.h"
+ Include dependency graph for hashmap_new.c:

Go to the source code of this file.

Functions

t_hashmaphashmap_new (const t_type *key_type, const t_type *val_type)
 Initializes a new empty map. More...
 

Function Documentation

◆ hashmap_new()

t_hashmap* hashmap_new ( const t_type key_type,
const t_type val_type 
)

Initializes a new empty map.

Parameters
key_typeThe type of keys that this map can hold
val_typeThe type of values that this map can hold
Returns
The new hashmap
Note
For this function to work, the key_type must be hashable (i.e. implement the hash function).

Definition at line 16 of file hashmap_new.c.