diff options
author | Susant Sahani <ssahani@vmware.com> | 2020-08-28 12:38:18 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-09-01 12:32:48 +0200 |
commit | b7847e05f53cf3f071d92e9c3b46652d8396c6ed (patch) | |
tree | 6fe7818176d7af9f8f90c5bf6a24ae20ad199615 /src/basic/hashmap.h | |
parent | Merge pull request #16885 from keszybz/rework-cache-timestamps (diff) | |
download | systemd-b7847e05f53cf3f071d92e9c3b46652d8396c6ed.tar.xz systemd-b7847e05f53cf3f071d92e9c3b46652d8396c6ed.zip |
basic: Introduce ordered_hashmap_ensure_put
Diffstat (limited to '')
-rw-r--r-- | src/basic/hashmap.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/hashmap.h b/src/basic/hashmap.h index 6009441621..c8f82b1df6 100644 --- a/src/basic/hashmap.h +++ b/src/basic/hashmap.h @@ -137,6 +137,9 @@ int _ordered_hashmap_ensure_allocated(OrderedHashmap **h, const struct hash_ops #define hashmap_ensure_allocated(h, ops) _hashmap_ensure_allocated(h, ops HASHMAP_DEBUG_SRC_ARGS) #define ordered_hashmap_ensure_allocated(h, ops) _ordered_hashmap_ensure_allocated(h, ops HASHMAP_DEBUG_SRC_ARGS) +int _ordered_hashmap_ensure_put(OrderedHashmap **h, const struct hash_ops *hash_ops, const void *key, void *value HASHMAP_DEBUG_PARAMS); +#define ordered_hashmap_ensure_put(s, ops, key, value) _ordered_hashmap_ensure_put(s, ops, key, value HASHMAP_DEBUG_SRC_ARGS) + IteratedCache *_hashmap_iterated_cache_new(HashmapBase *h); static inline IteratedCache *hashmap_iterated_cache_new(Hashmap *h) { return (IteratedCache*) _hashmap_iterated_cache_new(HASHMAP_BASE(h)); |