[vlc-devel] commit: objects: vlc_object_yield() returns the yield() -ed object for convenience. (Pierre d'Herbemont )

git version control git at videolan.org
Sat Sep 20 19:01:14 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Sep 20 18:57:18 2008 +0200| [3c33fb8b5d26cfa5bc7f3f58021dd5e8e34f84a0] | committer: Pierre d'Herbemont 

objects: vlc_object_yield() returns the yield()-ed object for convenience.

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

 include/vlc_objects.h |    2 +-
 src/misc/objects.c    |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/vlc_objects.h b/include/vlc_objects.h
index fc3dc8b..4e632f8 100644
--- a/include/vlc_objects.h
+++ b/include/vlc_objects.h
@@ -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 * ) );
diff --git a/src/misc/objects.c b/src/misc/objects.c
index 5216552..d4f3247 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -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;
 }
 
 /*****************************************************************************




More information about the vlc-devel mailing list