Commit c2a6b79e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vlc_object_lock_and_wait: broken by design, remove

The only user is LUA, inlined there. The return value seems suspicious
by the way.
(cherry picked from commit 1014a2aa)
parent 44e1f1e8
......@@ -174,26 +174,3 @@ static inline bool __vlc_object_alive (const vlc_object_t *obj)
VLC_EXPORT( int, __vlc_object_waitpipe, ( vlc_object_t *obj ));
#define vlc_object_waitpipe(a) \
__vlc_object_waitpipe( VLC_OBJECT(a) )
/* NOTE: this function is a *temporary* convenience.
* See the vlc_object_alive() documentation for a better alternative.
*/
static inline
bool __vlc_object_lock_and_wait( vlc_object_t *obj )
{
bool b;
vlc_object_lock( obj );
b = vlc_object_alive( obj );
if( b )
{
vlc_object_wait( obj );
b = vlc_object_alive( obj );
}
vlc_object_unlock( obj );
return b;
}
#define vlc_object_lock_and_wait( obj ) \
__vlc_object_lock_and_wait( VLC_OBJECT(obj) )
......@@ -171,7 +171,15 @@ static int vlclua_datadir_list( lua_State *L )
static int vlclua_lock_and_wait( lua_State *L )
{
vlc_object_t *p_this = vlclua_get_this( L );
int b_quit = vlc_object_lock_and_wait( p_this );
int b_quit;
vlc_object_lock( p_this );
b_quit = vlc_object_alive( p_this );
if( b_quit )
{
vlc_object_wait( p_this );
b_quit = vlc_object_alive( p_this );
}
lua_pushboolean( L, b_quit );
return 1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment