Shameless plug:

http://docs.frrouting.org/projects/dev-guide/en/latest/lists...

https://github.com/FRRouting/frr/blob/master/lib/typesafe.h

Differs in a bunch of design decisions. Memory management for items is strictly out of scope, though some of the structures use malloc/free for their own purposes (e.g. heap). Much more focus on sorted/hashed structures, explicitly differentiating for [not] having duplicate items that compare equal. Also, atomic/lock-free versions. Uses macros instead of #including files multiple times.

But fun to see someone else's go at the same idea :)

Might as well plug mine too:

https://github.com/ludocode/pottery

I'm not really sure what makes a project take off on HN. I posted mine here a couple weeks ago and got one single upvote :(. I'm glad to see the new style of #include templates getting more attention though. I think in general it's the right way to do templates in C.

FWIW, for sorting in a template-like C package I use https://github.com/swenson/sort/ .