summaryrefslogtreecommitdiff
path: root/man/rules
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-06 11:07:02 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commit1aa207c0a5005a80bf30924c2325f901d7f7f80c (patch)
tree84c65d2062737310d6b8f2b8bffe57031e85ffe2 /man/rules
parentf44b01c3269d71cff4566a894fe48c35ca77e11c (diff)
bus: optionally call a callbacks for cleanup
This adds a function sd_bus_slot_set_destroy_callback() to set a function which can free userdata or perform other cleanups. sd_bus_slot_get_destory_callback() queries the callback, and is included for completeness. Without something like this, for floating asynchronous callbacks, which might be called or not, depending on the sequence of events, it's hard to perform resource cleanup. The alternative would be to always perform the cleanup from the caller too, but that requires more coordination and keeping of some shared state. It's nicer to keep the cleanup contained between the callback and the function that requests the callback.
Diffstat (limited to 'man/rules')
-rw-r--r--man/rules/meson.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/man/rules/meson.build b/man/rules/meson.build
index 12a927caa..e9b045207 100644
--- a/man/rules/meson.build
+++ b/man/rules/meson.build
@@ -231,6 +231,10 @@ manpages = [
['sd_bus_set_connected_signal', '3', ['sd_bus_get_connected_signal'], ''],
['sd_bus_set_sender', '3', ['sd_bus_get_sender'], ''],
['sd_bus_set_watch_bind', '3', ['sd_bus_get_watch_bind'], ''],
+ ['sd_bus_slot_set_destroy_callback',
+ '3',
+ ['sd_bus_slot_get_destroy_callback'],
+ ''],
['sd_bus_slot_set_floating', '3', ['sd_bus_slot_get_floating'], ''],
['sd_bus_track_add_name',
'3',