]> git.sesse.net Git - vlc/blobdiff - src/control/core.c
libvlc_add_intf: remove dummy exception parameter
[vlc] / src / control / core.c
index 343efdd4650263c9c7bbf2794072e26f39644f5f..341f4ef2e5ca35c0c67c9d587080ad170fd44b56 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "libvlc_internal.h"
 #include <vlc/libvlc.h>
 
@@ -61,23 +65,8 @@ static void libvlc_exception_not_handled( const char *psz )
     abort();
 }
 
-void libvlc_exception_raise( libvlc_exception_t *p_exception,
-                             const char *psz_format, ... )
+void libvlc_exception_raise( libvlc_exception_t *p_exception )
 {
-    va_list args;
-
-    /* Make sure that there is no unnoticed previous exception */
-    if( p_exception && p_exception->b_raised )
-    {
-        libvlc_exception_not_handled( libvlc_errmsg() );
-        libvlc_exception_clear( p_exception );
-    }
-
-    /* Unformat-ize the message */
-    va_start( args, psz_format );
-    libvlc_vprinterr( psz_format, args );
-    va_end( args );
-
     /* Does caller care about exceptions ? */
     if( p_exception == NULL ) {
         /* Print something, so that lazy third-parties can easily
@@ -138,12 +127,10 @@ libvlc_instance_t * libvlc_new( int argc, const char *const *argv,
     p_new->libvlc_vlm.p_vlm = NULL;
     p_new->libvlc_vlm.p_event_manager = NULL;
     p_new->libvlc_vlm.pf_release = NULL;
-    p_new->b_playlist_locked = 0;
     p_new->ref_count = 1;
     p_new->verbosity = 1;
     p_new->p_callback_list = NULL;
     vlc_mutex_init(&p_new->instance_lock);
-    vlc_mutex_init(&p_new->event_callback_lock);
 
     return p_new;
 }
@@ -171,7 +158,6 @@ void libvlc_release( libvlc_instance_t *p_instance )
     if( refs == 0 )
     {
         vlc_mutex_destroy( lock );
-        vlc_mutex_destroy( &p_instance->event_callback_lock );
         if( p_instance->libvlc_vlm.pf_release )
             p_instance->libvlc_vlm.pf_release( p_instance );
         libvlc_InternalCleanup( p_instance->p_libvlc_int );
@@ -181,15 +167,9 @@ void libvlc_release( libvlc_instance_t *p_instance )
     }
 }
 
-int libvlc_add_intf( libvlc_instance_t *p_i, const char *name,
-                      libvlc_exception_t *p_e )
+int libvlc_add_intf( libvlc_instance_t *p_i, const char *name )
 {
-    if( libvlc_InternalAddIntf( p_i->p_libvlc_int, name ) )
-    {
-        libvlc_exception_raise( p_e, "Interface initialization failed" );
-        return -1;
-    }
-    return 0;
+    return libvlc_InternalAddIntf( p_i->p_libvlc_int, name ) ? -1 : 0;
 }
 
 void libvlc_wait( libvlc_instance_t *p_i )