summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2017-04-17 11:02:13 +0200
committerDavid Härdeman <david@hardeman.nu>2017-04-17 11:02:13 +0200
commite2c13faa266a4d2adededc8b720b498f914d530e (patch)
treeab88053c8056bf3fb1b62c2b32ab810f9aec83de /utils.h
parentbaf81f3c2715d218678ff65db5c711f021a69eda (diff)
Update to newer sd-bus API
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/utils.h b/utils.h
index f02c47a..49ff0b4 100644
--- a/utils.h
+++ b/utils.h
@@ -93,16 +93,6 @@ static inline void* zmalloc(size_t size)
} \
struct __useless_struct_to_allow_trailing_semicolon__
-
-static inline void sd_bus_close_unrefp(sd_bus **bus) {
- if (*bus) {
- sd_bus_flush(*bus);
- sd_bus_close(*bus);
- sd_bus_unref(*bus);
- }
-}
-#define _cleanup_bus_close_unref_ _cleanup_(sd_bus_close_unrefp)
-
static inline unsigned
strv_length(char **strv)
{
@@ -139,16 +129,12 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(FILE *, fclose);
DEFINE_TRIVIAL_CLEANUP_FUNC(DIR *, closedir);
#define _cleanup_closedir_ _cleanup_(closedirp)
-DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus *, sd_bus_unref);
-#define _cleanup_bus_unref_ _cleanup_(sd_bus_unrefp)
+#define _cleanup_bus_flush_close_unref_ _cleanup_(sd_bus_flush_close_unrefp)
-DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_slot *, sd_bus_slot_unref);
#define _cleanup_bus_slot_unref_ _cleanup_(sd_bus_slot_unrefp)
-DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_message *, sd_bus_message_unref);
#define _cleanup_bus_message_unref_ _cleanup_(sd_bus_message_unrefp)
-DEFINE_TRIVIAL_CLEANUP_FUNC(sd_event_source *, sd_event_source_unref);
#define _cleanup_event_source_unref_ _cleanup_(sd_event_source_unrefp)
#endif