diff options
author | Laurent Bigonville <bigon@bigon.be> | 2018-03-05 22:30:44 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2018-03-06 12:38:29 +0000 |
commit | 8a4e07925c54eac83878c39313f44fe87d6c3538 (patch) | |
tree | eef30b2e966d3fa81fa0ac0de6db6b5486cbce96 /dbus | |
parent | dd9f24794b875eabc8d4dd8a123691785136aad7 (diff) | |
download | dbus-8a4e07925c54eac83878c39313f44fe87d6c3538.tar.gz |
Add _dbus_clear_loop and _dbus_clear_watch
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92831
[smcv: Fix variable names]
Reviewed-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/dbus-mainloop.h | 7 | ||||
-rw-r--r-- | dbus/dbus-watch.h | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/dbus/dbus-mainloop.h b/dbus/dbus-mainloop.h index a76cb6f0..19a7c0d5 100644 --- a/dbus/dbus-mainloop.h +++ b/dbus/dbus-mainloop.h @@ -60,6 +60,13 @@ dbus_bool_t _dbus_loop_dispatch (DBusLoop *loop); int _dbus_get_oom_wait (void); void _dbus_wait_for_memory (void); +static inline void +_dbus_clear_loop (DBusLoop **pointer_to_loop) +{ + _dbus_clear_pointer_impl (DBusLoop, pointer_to_loop, + _dbus_loop_unref); +} + #endif /* !DOXYGEN_SHOULD_SKIP_THIS */ #endif /* DBUS_MAINLOOP_H */ diff --git a/dbus/dbus-watch.h b/dbus/dbus-watch.h index 8d8bbf2b..05d9b20e 100644 --- a/dbus/dbus-watch.h +++ b/dbus/dbus-watch.h @@ -99,6 +99,13 @@ DBusSocket _dbus_watch_get_socket (DBusWatch *watch); DBUS_PRIVATE_EXPORT DBusPollable _dbus_watch_get_pollable (DBusWatch *watch); +static inline void +_dbus_clear_watch (DBusWatch **pointer_to_watch) +{ + _dbus_clear_pointer_impl (DBusWatch, pointer_to_watch, + _dbus_watch_unref); +} + /** @} */ DBUS_END_DECLS |