[vlc-devel] commit: var_GetChecked and var_SetChecked object auto-cast ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Feb 13 18:51:58 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 13 19:47:23 2010 +0200| [3fd49ca4086e52e45c8ca8b18326e44f08320147] | committer: Rémi Denis-Courmont 

var_GetChecked and var_SetChecked object auto-cast

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3fd49ca4086e52e45c8ca8b18326e44f08320147
---

 include/vlc_variables.h |    2 ++
 src/misc/variables.c    |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/vlc_variables.h b/include/vlc_variables.h
index 3dbeaf1..51d371b 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 b5457c4..654cd25 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 )
 {




More information about the vlc-devel mailing list