[vlc-devel] commit: Added var_InheritBool. (Laurent Aimar )
git version control
git at videolan.org
Tue Jan 5 21:07:22 CET 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Jan 3 22:14:18 2010 +0100| [6870df1842491b29994f240917e4803c88c9ca53] | committer: Laurent Aimar
Added var_InheritBool.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6870df1842491b29994f240917e4803c88c9ca53
---
include/vlc_variables.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/vlc_variables.h b/include/vlc_variables.h
index 8f92a7d..2f170fe 100644
--- a/include/vlc_variables.h
+++ b/include/vlc_variables.h
@@ -719,6 +719,18 @@ static inline int __var_ToggleBool( vlc_object_t *p_obj, const char *psz_name )
*/
#define var_ToggleBool(a,b) __var_ToggleBool( VLC_OBJECT(a),b )
+
+LIBVLC_USED
+static inline bool var_InheritBool( vlc_object_t *obj, const char *name )
+{
+ vlc_value_t val;
+
+ if( var_Inherit( obj, name, VLC_VAR_BOOL, &val ) )
+ val.b_bool = false;
+ return val.b_bool;
+}
+#define var_InheritBool(o, n) var_InheritBool(VLC_OBJECT(o), n)
+
LIBVLC_USED
static inline int var_InheritInteger( vlc_object_t *obj, const char *name )
{
More information about the vlc-devel
mailing list