This is a collection of commonly used data types. It is hand implemented and still far from being complete. Available so far:
A dynamically growing array (grows in chunks). It allocates multiple fixed size C arrays of void pointers, thus allowing to store any arbitrary data type. The size of such a static array can be configured by changing the value of DARRAY_PAGE_SIZE in config.h.
A simple Hash Set. To use it you have to define two functions, a hash and an equals function, and provide it to the init method. It dynamically rehashes itself when growing too full, based on the HSET_MAX_RATIO in config.h
A priority queue. You have to provide a compare_to method that returns a signed integer, based on the outcome of the comparison.
Contains everything that is needed for A*. I currently implemented as few methods as necessary while trying to keep the ones that I did implement as generic as possible.
For all API methods I chose names that I would expect. I tried to be as consistent as possible, but I cannot guarantee that I didn't make some errors here and there. For example:
All data structures have a module_init method. They all can be destroyed using module_destroy, always taking two arguments: the data structure itself and an optional destructor for the elements, accepting NULL as an indicator to use builtin free. Setters with an index are called module_set, setters without index are called module_add. And many more ...