]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ordered-set: introduce ordered_set_get()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 20 May 2021 19:01:24 +0000 (04:01 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 23 May 2021 08:12:40 +0000 (17:12 +0900)
src/basic/ordered-set.h

index 64df41766f8229eae04ce5e48970520ab38c4930..3ee47350b33cf8beb6340fe5acd639cebd747c91 100644 (file)
@@ -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);
 }