Nice article! I think eventually you need to move to macros to support multiple key/value types in C. Just leaving some macro implementations for reference:
- https://github.com/attractivechaos/klib/blob/master/khash.h
- https://github.com/attractivechaos/klib/blob/master/khash.h