[vlc-devel] commit: libvlc_add_intf: remove dummy exception parameter ( Rémi Denis-Courmont )
git version control
git at videolan.org
Mon Jan 4 18:19:50 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jan 4 19:13:46 2010 +0200| [cec206c39a1e2ff00d9e051a5649a3e3503d3cc8] | committer: Rémi Denis-Courmont
libvlc_add_intf: remove dummy exception parameter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cec206c39a1e2ff00d9e051a5649a3e3503d3cc8
---
bin/vlc.c | 11 +++--------
bin/winvlc.c | 4 ++--
include/vlc/libvlc.h | 4 +---
src/control/core.c | 11 ++---------
4 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/bin/vlc.c b/bin/vlc.c
index 246ea14..4c2085b 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -159,17 +159,12 @@ int main( int i_argc, const char *ppsz_argv[] )
if (vlc != NULL)
{
- libvlc_add_intf (vlc, "signals", &ex);
- if (libvlc_exception_raised (&ex))
- {
- libvlc_exception_clear (&ex);
+ if (libvlc_add_intf (vlc, "signals"))
pthread_sigmask (SIG_UNBLOCK, &set, NULL);
- }
#if !defined (HAVE_MAEMO)
- libvlc_add_intf (vlc, "globalhotkeys,none", &ex);
+ libvlc_add_intf (vlc, "globalhotkeys,none");
#endif
- libvlc_exception_clear (&ex);
- libvlc_add_intf (vlc, NULL, &ex);
+ libvlc_add_intf (vlc, NULL);
libvlc_playlist_play (vlc, -1, 0, NULL, &dummy);
libvlc_wait (vlc);
diff --git a/bin/winvlc.c b/bin/winvlc.c
index 3ac028a..5bec350 100644
--- a/bin/winvlc.c
+++ b/bin/winvlc.c
@@ -171,8 +171,8 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
vlc = libvlc_new (argc, (const char **)argv, &ex);
if (vlc != NULL)
{
- libvlc_add_intf (vlc, "globalhotkeys,none", &ex);
- libvlc_add_intf (vlc, NULL, &ex);
+ libvlc_add_intf (vlc, "globalhotkeys,none");
+ libvlc_add_intf (vlc, NULL);
libvlc_playlist_play (vlc, -1, 0, NULL, &dummy);
libvlc_wait (vlc);
libvlc_release (vlc);
diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h
index 1fe6717..e96ffb5 100644
--- a/include/vlc/libvlc.h
+++ b/include/vlc/libvlc.h
@@ -191,12 +191,10 @@ VLC_PUBLIC_API void libvlc_retain( libvlc_instance_t * );
*
* \param p_instance the instance
* \param name interface name, or NULL for default
- * \param p_exception an initialized exception pointer
* \return 0 on success, -1 on error.
*/
VLC_PUBLIC_API
-int libvlc_add_intf( libvlc_instance_t *p_instance, const char *name,
- libvlc_exception_t *p_exception );
+int libvlc_add_intf( libvlc_instance_t *p_instance, const char *name );
/**
* Waits until an interface causes the instance to exit.
diff --git a/src/control/core.c b/src/control/core.c
index 986c377..341f4ef 100644
--- a/src/control/core.c
+++ b/src/control/core.c
@@ -167,16 +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_printerr("Interface initialization failed");
- libvlc_exception_raise( p_e );
- return -1;
- }
- return 0;
+ return libvlc_InternalAddIntf( p_i->p_libvlc_int, name ) ? -1 : 0;
}
void libvlc_wait( libvlc_instance_t *p_i )
More information about the vlc-devel
mailing list