vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Tue Feb 19 18:13:20 2019 +0200| [7dcc3cbf177ce5c925330a1fbddffc460de85a7a] | committer: Rémi Denis-Courmont
objects: remove the libvlc pointer > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7dcc3cbf177ce5c925330a1fbddffc460de85a7a --- include/vlc_objects.h | 10 +++------- src/misc/objects.c | 2 -- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/include/vlc_objects.h b/include/vlc_objects.h index 70ca5c9c74..d5ad38c7d3 100644 --- a/include/vlc_objects.h +++ b/include/vlc_objects.h @@ -59,12 +59,6 @@ struct vlc_common_members */ bool force; - /** LibVLC instance - * - * Root VLC object of the objects tree that this object belongs in. - */ - libvlc_int_t *libvlc; - /** Parent object * * The parent VLC object in the objects tree. For the root (the LibVLC @@ -133,7 +127,9 @@ VLC_API char *vlc_object_get_name( const vlc_object_t * ) VLC_USED; VLC_USED static inline libvlc_int_t *vlc_object_instance(vlc_object_t *obj) { - return obj->obj.libvlc; + while (obj->obj.parent != NULL) + obj = obj->obj.parent; + return (libvlc_int_t *)obj; } #define vlc_object_instance(o) vlc_object_instance(VLC_OBJECT(o)) diff --git a/src/misc/objects.c b/src/misc/objects.c index f97bbaeb20..d6c7c4e997 100644 --- a/src/misc/objects.c +++ b/src/misc/objects.c @@ -220,7 +220,6 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length, vlc_object_internals_t *papriv = vlc_internals (parent); obj->obj.flags = parent->obj.flags; - obj->obj.libvlc = vlc_object_instance(parent); /* Attach the child to its parent (no lock needed) */ obj->obj.parent = vlc_object_hold (parent); @@ -235,7 +234,6 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length, libvlc_int_t *self = (libvlc_int_t *)obj; obj->obj.flags = 0; - obj->obj.libvlc = self; obj->obj.parent = NULL; /* TODO: should be in src/libvlc.c */ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
