]> git.sesse.net Git - vlc/commitdiff
objects: vlc_object_yield() returns the yield()-ed object for convenience.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 20 Sep 2008 16:57:18 +0000 (18:57 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 20 Sep 2008 17:04:20 +0000 (19:04 +0200)
include/vlc_objects.h
src/misc/objects.c

index fc3dc8b95b74c8c4ea096b1ae5afb2de2b3f1977..4e632f8f7aaeb380713ef39badc564566edbbb90 100644 (file)
@@ -84,7 +84,7 @@ __attribute__((deprecated))
 #endif
 VLC_EXPORT( void *, __vlc_object_find, ( vlc_object_t *, int, int ) );
 VLC_EXPORT( vlc_object_t *, vlc_object_find_name, ( vlc_object_t *, const char *, int ) );
-VLC_EXPORT( void, __vlc_object_yield, ( vlc_object_t * ) );
+VLC_EXPORT( void *, __vlc_object_yield, ( vlc_object_t * ) );
 VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) );
 VLC_EXPORT( vlc_list_t *, __vlc_list_find, ( vlc_object_t *, int, int ) );
 VLC_EXPORT( vlc_list_t *, __vlc_list_children, ( vlc_object_t * ) );
index 5216552f85ffb618fd3fcaf3ef01e8e6abd521f7..d4f32477381730d24ea2b8f07855022e6ce577c8 100644 (file)
@@ -613,7 +613,7 @@ vlc_object_t *vlc_object_find_name( vlc_object_t *p_this,
 /**
  * Increment an object reference counter.
  */
-void __vlc_object_yield( vlc_object_t *p_this )
+void __vlc_object_yield( vlc_object_t *p_this )
 {
     vlc_object_internals_t *internals = vlc_internals( p_this );
 
@@ -623,6 +623,7 @@ void __vlc_object_yield( vlc_object_t *p_this )
     /* Increment the counter */
     internals->i_refcount++;
     vlc_spin_unlock( &internals->ref_spin );
+    return p_this;
 }
 
 /*****************************************************************************