util: add minimal OrderedSet type

System Internals / systemd - Lennart Poettering [poettering.net] - 8 April 2015 10:22 UTC

OrderedSet implements a Set-like structure, but maintains insertion ordered. It is hence to Set what OrderedHashmap is for Hashmap.

Internally, this is only a wrapper around OrderedHashmap for now, but this could one day be improved and be added to hashmap.c natively.

4a280a7 util: add minimal OrderedSet type
Makefile.am | 1 +
src/shared/ordered-set.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 60 insertions(+)

Upstream: github.com


  • Share