[vlc-devel] commit: Cleanup msg_Generic functions ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Feb 6 17:36:28 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 6 18:28:51 2010 +0200| [a519cf4a4d95fc1b3aba6ab880b07a1b11a755a9] | committer: Rémi Denis-Courmont
Cleanup msg_Generic functions
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a519cf4a4d95fc1b3aba6ab880b07a1b11a755a9
---
include/vlc_messages.h | 14 +++++++-------
modules/demux/mkv/matroska_segment_parse.cpp | 2 +-
modules/misc/lua/vlc.h | 3 +--
src/libvlccore.sym | 4 ++--
src/misc/messages.c | 20 +++++++-------------
5 files changed, 18 insertions(+), 25 deletions(-)
diff --git a/include/vlc_messages.h b/include/vlc_messages.h
index b5bb64a..5ee68c4 100644
--- a/include/vlc_messages.h
+++ b/include/vlc_messages.h
@@ -87,21 +87,21 @@ typedef struct msg_subscription_t msg_subscription_t;
/*****************************************************************************
* Prototypes
*****************************************************************************/
-VLC_EXPORT( void, __msg_Generic, ( vlc_object_t *, int, const char *, const char *, ... ) LIBVLC_FORMAT( 4, 5 ) );
-VLC_EXPORT( void, __msg_GenericVa, ( vlc_object_t *, int, const char *, const char *, va_list args ) );
-#define msg_GenericVa(a, b, c, d, e) __msg_GenericVa(VLC_OBJECT(a), b, c, d, e)
+VLC_EXPORT( void, msg_Generic, ( vlc_object_t *, int, const char *, const char *, ... ) LIBVLC_FORMAT( 4, 5 ) );
+VLC_EXPORT( void, msg_GenericVa, ( vlc_object_t *, int, const char *, const char *, va_list args ) );
+#define msg_GenericVa(a, b, c, d, e) msg_GenericVa(VLC_OBJECT(a), b, c, d, e)
#define msg_Info( p_this, ... ) \
- __msg_Generic( VLC_OBJECT(p_this), VLC_MSG_INFO, \
+ msg_Generic( VLC_OBJECT(p_this), VLC_MSG_INFO, \
MODULE_STRING, __VA_ARGS__ )
#define msg_Err( p_this, ... ) \
- __msg_Generic( VLC_OBJECT(p_this), VLC_MSG_ERR, \
+ msg_Generic( VLC_OBJECT(p_this), VLC_MSG_ERR, \
MODULE_STRING, __VA_ARGS__ )
#define msg_Warn( p_this, ... ) \
- __msg_Generic( VLC_OBJECT(p_this), VLC_MSG_WARN, \
+ msg_Generic( VLC_OBJECT(p_this), VLC_MSG_WARN, \
MODULE_STRING, __VA_ARGS__ )
#define msg_Dbg( p_this, ... ) \
- __msg_Generic( VLC_OBJECT(p_this), VLC_MSG_DBG, \
+ msg_Generic( VLC_OBJECT(p_this), VLC_MSG_DBG, \
MODULE_STRING, __VA_ARGS__ )
typedef struct msg_cb_data_t msg_cb_data_t;
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 0afabbb..0349054 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -150,7 +150,7 @@ static void MkvTree( demux_t & demuxer, int i_level, const char *psz_format, ...
psz_foo2[ 4 * i_level ] = '+';
psz_foo2[ 4 * i_level + 1 ] = ' ';
strcpy( &psz_foo2[ 4 * i_level + 2 ], psz_format );
- __msg_GenericVa( VLC_OBJECT(&demuxer),VLC_MSG_DBG, "mkv", psz_foo2, args );
+ msg_GenericVa( &demuxer,VLC_MSG_DBG, "mkv", psz_foo2, args );
free( psz_foo2 );
va_end( args );
}
diff --git a/modules/misc/lua/vlc.h b/modules/misc/lua/vlc.h
index 34a0878..ea7e314 100644
--- a/modules/misc/lua/vlc.h
+++ b/modules/misc/lua/vlc.h
@@ -67,8 +67,7 @@ static inline void lua_Dbg( vlc_object_t * p_this, const char * ppz_fmt, ... )
{
va_list ap;
va_start( ap, ppz_fmt );
- __msg_GenericVa( ( vlc_object_t *)p_this, VLC_MSG_DBG, MODULE_STRING,
- ppz_fmt, ap );
+ msg_GenericVa( p_this, VLC_MSG_DBG, MODULE_STRING, ppz_fmt, ap );
va_end( ap );
}
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 591fe9c..67d4afa 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -254,8 +254,8 @@ module_release
__module_unneed
msg_DisableObjectPrinting
msg_EnableObjectPrinting
-__msg_Generic
-__msg_GenericVa
+msg_Generic
+msg_GenericVa
msg_Subscribe
msg_Unsubscribe
msleep
diff --git a/src/misc/messages.c b/src/misc/messages.c
index f35debc..3541eaf 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -87,8 +87,6 @@ static inline msg_bank_t *libvlc_bank (libvlc_int_t *inst)
/*****************************************************************************
* Local prototypes
*****************************************************************************/
-static void QueueMsg ( vlc_object_t *, int, const char *,
- const char *, va_list );
static void PrintMsg ( vlc_object_t *, msg_item_t * );
static vlc_mutex_t msg_stack_lock = VLC_STATIC_MUTEX;
@@ -263,26 +261,20 @@ void msg_Unsubscribe (msg_subscription_t *sub)
}
/*****************************************************************************
- * __msg_*: print a message
+ * msg_*: print a message
*****************************************************************************
* These functions queue a message for later printing.
*****************************************************************************/
-void __msg_Generic( vlc_object_t *p_this, int i_type, const char *psz_module,
+void msg_Generic( vlc_object_t *p_this, int i_type, const char *psz_module,
const char *psz_format, ... )
{
va_list args;
va_start( args, psz_format );
- QueueMsg( p_this, i_type, psz_module, psz_format, args );
+ msg_GenericVa (p_this, i_type, psz_module, psz_format, args);
va_end( args );
}
-void __msg_GenericVa( vlc_object_t *p_this, int i_type, const char *psz_module,
- const char *psz_format, va_list args )
-{
- QueueMsg( p_this, i_type, psz_module, psz_format, args );
-}
-
/**
* Destroys a message.
*/
@@ -296,6 +288,7 @@ static void msg_Free (gc_object_t *gc)
free (msg);
}
+#undef msg_GenericVa
/**
* Add a message to a queue
*
@@ -304,8 +297,9 @@ static void msg_Free (gc_object_t *gc)
* is full). If the message can't be converted to string in memory, it issues
* a warning.
*/
-static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module,
- const char *psz_format, va_list _args )
+void msg_GenericVa (vlc_object_t *p_this, int i_type,
+ const char *psz_module,
+ const char *psz_format, va_list _args)
{
size_t i_header_size; /* Size of the additionnal header */
vlc_object_t *p_obj;
More information about the vlc-devel
mailing list