set: introduce set_to_strv()

It is similar to set_get_strv(), but invalidates the set on success.
This commit is contained in:
Yu Watanabe
2025-04-13 04:59:26 +09:00
parent 4da43aeb0c
commit 24655047b0
3 changed files with 43 additions and 0 deletions
+2
View File
@@ -114,6 +114,8 @@ static inline char **set_get_strv(Set *s) {
return _hashmap_get_strv(HASHMAP_BASE(s));
}
char** set_to_strv(Set **s);
int _set_ensure_put(Set **s, const struct hash_ops *hash_ops, const void *key HASHMAP_DEBUG_PARAMS);
#define set_ensure_put(s, hash_ops, key) _set_ensure_put(s, hash_ops, key HASHMAP_DEBUG_SRC_ARGS)