[vlc-commits] objects: add vlc_object_logger() convenience wrapper

Rémi Denis-Courmont git at videolan.org
Mon Mar 4 21:05:37 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Mar  4 22:00:56 2019 +0200| [f7505fc8d9fbdc345a71e11c0b951d712f75021a] | committer: Rémi Denis-Courmont

objects: add vlc_object_logger() convenience wrapper

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f7505fc8d9fbdc345a71e11c0b951d712f75021a
---

 include/vlc_objects.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/vlc_objects.h b/include/vlc_objects.h
index 56282b2ef5..b5ad73d907 100644
--- a/include/vlc_objects.h
+++ b/include/vlc_objects.h
@@ -112,6 +112,12 @@ VLC_API const char *vlc_object_typename(const vlc_object_t *obj) VLC_USED;
 VLC_API vlc_object_t *vlc_object_parent(vlc_object_t *obj) VLC_USED;
 #define vlc_object_parent(o) vlc_object_parent(VLC_OBJECT(o))
 
+static inline struct vlc_logger *vlc_object_logger(vlc_object_t *obj)
+{
+    return obj->obj.logger;
+}
+#define vlc_object_logger(o) vlc_object_logger(VLC_OBJECT(o))
+
 /**
  * Tries to get the name of module bound to an object.
  *



More information about the vlc-commits mailing list