]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-id128: introduce id128_hash_ops_free
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Oct 2022 00:08:09 +0000 (09:08 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 19 Jan 2023 08:55:21 +0000 (17:55 +0900)
src/libsystemd/sd-id128/id128-util.c
src/libsystemd/sd-id128/id128-util.h

index a27f4bf7427d799c024caa4a4c890a25c054d3f2..a009a110a96fdfb58ba67443eb508a75fb59276b 100644 (file)
@@ -173,6 +173,7 @@ sd_id128_t id128_make_v4_uuid(sd_id128_t id) {
 }
 
 DEFINE_HASH_OPS(id128_hash_ops, sd_id128_t, id128_hash_func, id128_compare_func);
+DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR(id128_hash_ops_free, sd_id128_t, id128_hash_func, id128_compare_func, free);
 
 int id128_get_product(sd_id128_t *ret) {
         sd_id128_t uuid;
index 4b91a16bd163f21c58a160b2a72d2df96b72e5a1..887f443d6939cfe098fc57d5e1d9fae8f55552bf 100644 (file)
@@ -27,6 +27,7 @@ int id128_write(const char *p, Id128FormatFlag f, sd_id128_t id);
 void id128_hash_func(const sd_id128_t *p, struct siphash *state);
 int id128_compare_func(const sd_id128_t *a, const sd_id128_t *b) _pure_;
 extern const struct hash_ops id128_hash_ops;
+extern const struct hash_ops id128_hash_ops_free;
 
 sd_id128_t id128_make_v4_uuid(sd_id128_t id);