From: RĂ©mi Denis-Courmont Date: Sat, 13 Feb 2010 17:47:23 +0000 (+0200) Subject: var_GetChecked and var_SetChecked object auto-cast X-Git-Tag: 1.1.0-ff~105 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3fd49ca4086e52e45c8ca8b18326e44f08320147;p=vlc var_GetChecked and var_SetChecked object auto-cast --- diff --git a/include/vlc_variables.h b/include/vlc_variables.h index 3dbeaf18dd..51d371b6ff 100644 --- a/include/vlc_variables.h +++ b/include/vlc_variables.h @@ -147,7 +147,9 @@ VLC_EXPORT( int, var_Get, ( vlc_object_t *, const char *, vlc_value_t * ) ); #define var_Get(a,b,c) var_Get( VLC_OBJECT(a), b, c ) VLC_EXPORT( int, var_SetChecked, ( vlc_object_t *, const char *, int, vlc_value_t ) ); +#define var_SetChecked(o,n,t,v) var_SetChecked(VLC_OBJECT(o),n,t,v) VLC_EXPORT( int, var_GetChecked, ( vlc_object_t *, const char *, int, vlc_value_t * ) ); +#define var_GetChecked(o,n,t,v) var_GetChecked(VLC_OBJECT(o),n,t,v) VLC_EXPORT( int, var_GetAndSet, ( vlc_object_t *, const char *, int, vlc_value_t * ) ); VLC_EXPORT( int, var_Inherit, ( vlc_object_t *, const char *, int, vlc_value_t * ) ); diff --git a/src/misc/variables.c b/src/misc/variables.c index b5457c4e3f..654cd2584b 100644 --- a/src/misc/variables.c +++ b/src/misc/variables.c @@ -734,6 +734,7 @@ int var_Type( vlc_object_t *p_this, const char *psz_name ) return i_type; } +#undef var_SetChecked int var_SetChecked( vlc_object_t *p_this, const char *psz_name, int expected_type, vlc_value_t val ) { @@ -795,6 +796,7 @@ int var_Set( vlc_object_t *p_this, const char *psz_name, vlc_value_t val ) return var_SetChecked( p_this, psz_name, 0, val ); } +#undef var_GetChecked int var_GetChecked( vlc_object_t *p_this, const char *psz_name, int expected_type, vlc_value_t *p_val ) {