libmya 0.1.0
Library to parse Mya language.
Loading...
Searching...
No Matches
hashtable.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4
5#include "types/err.h"
6#include "types/hashtable.h"
7
14void
15hashtable_init(hashtable_t* hashtable, unsigned int size);
16
22void
24
32void
33hashtable_set(hashtable_t* hashtable, const char* key, int64_t value);
34
46hashtable_get(hashtable_t* hashtable, const char* key, int64_t* value);
enum error_code error_code_t
Enumeration of error codes.
void hashtable_init(hashtable_t *hashtable, unsigned int size)
Initializes a hashtable.
Definition hashtable.c:18
error_code_t hashtable_get(hashtable_t *hashtable, const char *key, int64_t *value)
Get the value of the specified key inside the hashtable.
Definition hashtable.c:73
void hashtable_close(hashtable_t *hashtable)
Close the given hashtable.
Definition hashtable.c:26
void hashtable_set(hashtable_t *hashtable, const char *key, int64_t value)
Set the value of the specified key inside the hashtable.
Definition hashtable.c:51
A hashtable.
Definition hashtable.h:31
struct hashtable hashtable_t
A hashtable.