]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
in-addr-util: introduce in6_addr_hash_ops_free
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Sep 2021 12:11:50 +0000 (21:11 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 6 Oct 2021 16:03:06 +0000 (01:03 +0900)
src/basic/in-addr-util.c
src/basic/in-addr-util.h

index 3d392afc082f007ec721708408bd653e315cd142..c262dfe15605eac73549c342f7301fb38493c713 100644 (file)
@@ -846,3 +846,9 @@ int in6_addr_compare_func(const struct in6_addr *a, const struct in6_addr *b) {
 }
 
 DEFINE_HASH_OPS(in6_addr_hash_ops, struct in6_addr, in6_addr_hash_func, in6_addr_compare_func);
+DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR(
+        in6_addr_hash_ops_free,
+        struct in6_addr,
+        in6_addr_hash_func,
+        in6_addr_compare_func,
+        free);
index c74b0d512b480ef05ec6e3759956fcc6e4d8fea4..1d610c10c834ae3c6ac98b118aee77ea7d9ddfd0 100644 (file)
@@ -119,6 +119,7 @@ int in6_addr_compare_func(const struct in6_addr *a, const struct in6_addr *b);
 
 extern const struct hash_ops in_addr_data_hash_ops;
 extern const struct hash_ops in6_addr_hash_ops;
+extern const struct hash_ops in6_addr_hash_ops_free;
 
 #define IPV4_ADDRESS_FMT_STR     "%u.%u.%u.%u"
 #define IPV4_ADDRESS_FMT_VAL(address)              \