]> git.sesse.net Git - vlc/commitdiff
var_GetChecked and var_SetChecked object auto-cast
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 13 Feb 2010 17:47:23 +0000 (19:47 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 13 Feb 2010 17:51:19 +0000 (19:51 +0200)
include/vlc_variables.h
src/misc/variables.c

index 3dbeaf18ddf26147c91b13e778952d00657daa0a..51d371b6ffa468c15f3fdd92a044cb3780862e3b 100644 (file)
@@ -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 * ) );
index b5457c4e3fbc78c145c5fcf6fa7c3550e1180fe7..654cd2584ba80b209011a7b5bed33e3fd9b082a9 100644 (file)
@@ -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 )
 {