Implement Breakpoints
This commit is contained in:
27
hash.h
Normal file
27
hash.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef HASH_H_
|
||||
#define HASH_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct HashEntry {
|
||||
const char *key;
|
||||
void *value;
|
||||
size_t sz;
|
||||
} HashEntry;
|
||||
|
||||
typedef struct {
|
||||
HashEntry **buckets;
|
||||
size_t capacity;
|
||||
} HashTable;
|
||||
|
||||
void hashtable_init (HashTable *t, size_t capacity);
|
||||
void hashtable_deinit (HashTable *t);
|
||||
HashEntry * hashtable_new (const char *key, void *value, size_t sz);
|
||||
void * hashtable_get (HashTable *t, const char *key);
|
||||
void hashtable_set (HashTable *t, const char *key, void *value, size_t sz);
|
||||
bool hashtable_delete (HashTable *t, const char *key);
|
||||
bool hashtable_check (HashTable *t, const char *key);
|
||||
|
||||
#endif // HASH_H_
|
||||
Reference in New Issue
Block a user