A hashmap implementation using the Robert Jenkins' 32 bit mix function with Knuth's multiplicative method for hashing.
- Install the library
em list
em install
em build lib
- Include in a file
touch test.c
#include "export/EmeraldsHashmap.h"
int main(void) {
EmeraldsHashmap *h = hashmap_new();
hashmap_add(h, "one", (void*)1);
hashmap_add(h, "value", (void*)"value");
printf("%s\n", (char*)hashmap_get(h, "value"));
printf("%ld\n", (long)hashmap_get(h, "one"));
}
- Compile
clang test.c export/*.*o
- Write tests
- Fork it (https://github.com/Oblivious-Oblivious/EmeraldsHashmap/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- Oblivious - creator and maintainer