}
DEFINE_TRIVIAL_CLEANUP_FUNC(Member*, member_free);
-static Set* member_set_free(Set *s) {
- return set_free_with_destructor(s, member_free);
-}
-DEFINE_TRIVIAL_CLEANUP_FUNC(Set*, member_set_free);
-
static int on_interface(const char *interface, uint64_t flags, void *userdata) {
_cleanup_(member_freep) Member *m = NULL;
Set *members = ASSERT_PTR(userdata);
return 0;
}
-DEFINE_PRIVATE_HASH_OPS(member_hash_ops, Member, member_hash_func, member_compare_func);
+DEFINE_PRIVATE_HASH_OPS_WITH_KEY_DESTRUCTOR(
+ member_hash_ops,
+ Member,
+ member_hash_func,
+ member_compare_func,
+ member_free);
static int introspect(int argc, char **argv, void *userdata) {
static const XMLIntrospectOps ops = {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply_xml = NULL;
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
- _cleanup_(member_set_freep) Set *members = NULL;
+ _cleanup_set_free_ Set *members = NULL;
unsigned name_width, type_width, signature_width, result_width;
Member *m;
const char *xml;