Advanced Distributed Systems module at HSLU
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
451 B

/*
* dict.h
*
* Created on: 30 Sep 2022
* Author: simon
*/
#ifndef LIB_DICT_H_
#define LIB_DICT_H_
#include "string.h"
typedef struct dict_t_struct {
char *key;
void *value;
struct dict_t_struct *next;
} dict_t;
dict_t** dictAlloc(void);
void dictDealoc(dict_t** dict);
void* getItem(dict_t* dict, char* key);
void delItem(dict_t** dict, char* key);
void addItem(dict_t** dict, char* key, void* value);
#endif /* LIB_DICT_H_ */