数据结构
uthash
Any C structure can be stored in a hash table using uthash. Just add a UT_hash_handle to the structure and choose one or more fields in your structure to act as the key. Then use these macros to store, retrieve or delete items from the hash table.
uthash: a hash table for C structures (troydhanson.github.io)
文档:uthash: a hash table for C structures (troydhanson.github.io)
源码:troydhanson/uthash: C macros for hash tables and more (github.com)
tpl
tpl home page (troydhanson.github.io)
You can use tpl to store and reload your C data quickly and easily. Tpl works with files, memory buffers and file descriptors so it’s suitable for use as a file format, IPC message format or any scenario where you need to store and retrieve your data.
文档:tpl User Guide (troydhanson.github.io)
源码:troydhanson/tpl: tpl - a small binary serialization library for C (github.com)