2 ms·
Typesafe wrapper around the same code: https://github.com/FRRouting/frr/blob/master/lib/typerb.h https://github.com/FRRouting/frr/blob/master/lib/typerb.h htt
by eqvinox 6y ago
Typesafe wrapper around the same code:
https://github.com/FRRouting/frr/blob/master/lib/typerb.h https://github.com/FRRouting/frr/blob/master/lib/typerb.h
https://github.com/FRRouting/frr/blob/master/lib/typerb.c https://github.com/FRRouting/frr/blob/master/lib/typerb.c
Typesafe wrapper with identical API around linked lists, heap & hash:
https://github.com/FRRouting/frr/blob/master/lib/typesafe.h https://github.com/FRRouting/frr/blob/master/lib/typesafe.h
https://github.com/FRRouting/frr/blob/master/lib/typesafe.c https://github.com/FRRouting/frr/blob/master/lib/typesafe.c
Docs:
http://docs.frrouting.org/projects/dev-guide/en/latest/lists.html http://docs.frrouting.org/projects/dev-guide/en/latest/lists...
Typesafe = each tree/list/... uses its own struct and the APIs directly use pointers to the actual member data structures rather than the tree implementation structs.
Disclaimer: I wrote these (only the wrapper in case of the RB tree, the entire thing for the others)