2 ms·
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: -
by jmacjmac 3y ago
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
- https://github.com/tezc/sc/tree/master/map https://github.com/tezc/sc/tree/master/map
- https://github.com/troydhanson/uthash https://github.com/troydhanson/uthash
- hot_gril 3y agoI think uthash is the one I used long ago. Fun and easy.