Skip to content

Instantly share code, notes, and snippets.

@clarkgrubb
Created May 14, 2010 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clarkgrubb/400764 to your computer and use it in GitHub Desktop.
Save clarkgrubb/400764 to your computer and use it in GitHub Desktop.
#ifndef _hashtable_h_
#define _hashtable_h_ 1
typedef struct hashtable_list_item {
char* key;
char* value;
struct hashtable_list_item* next;
} hashtable_list_item;
typedef struct {
hashtable_list_item** array;
unsigned int size;
} hashtable;
hashtable* hashtable_create(unsigned int size);
void hashtable_insert(hashtable *ht, char* key, char* value);
char* hashtable_search(hashtable *ht, char* key);
void hashtable_delete(hashtable *ht, char* key);
#endif // _hashtable_h_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment