From: Yu Watanabe Date: Thu, 20 May 2021 19:01:24 +0000 (+0900) Subject: ordered-set: introduce ordered_set_get() X-Git-Tag: v249-rc1~168^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fbb1a3986655f92e21e80515671a6784c51dbcea;p=thirdparty%2Fsystemd.git ordered-set: introduce ordered_set_get() --- diff --git a/src/basic/ordered-set.h b/src/basic/ordered-set.h index 64df41766f8..3ee47350b33 100644 --- a/src/basic/ordered-set.h +++ b/src/basic/ordered-set.h @@ -34,6 +34,10 @@ static inline int ordered_set_put(OrderedSet *s, void *p) { return ordered_hashmap_put((OrderedHashmap*) s, p, p); } +static inline void *ordered_set_get(OrderedSet *s, const void *p) { + return ordered_hashmap_get((OrderedHashmap*) s, p); +} + static inline unsigned ordered_set_size(OrderedSet *s) { return ordered_hashmap_size((OrderedHashmap*) s); }