[vlc-devel] commit: variables: add a var_GetAddress function. ( Rémi Duraffort )
git version control
git at videolan.org
Sat Oct 10 11:57:45 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Oct 5 10:43:11 2009 +0200| [4632744f6dced94c5ff38f1a7efab4e4beb3112f] | committer: Rémi Duraffort
variables: add a var_GetAddress function.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4632744f6dced94c5ff38f1a7efab4e4beb3112f
---
include/vlc_variables.h | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/include/vlc_variables.h b/include/vlc_variables.h
index 06ae899..5c84a7a 100644
--- a/include/vlc_variables.h
+++ b/include/vlc_variables.h
@@ -416,6 +416,15 @@ static inline char *__var_GetNonEmptyString( vlc_object_t *p_obj, const char *ps
return NULL;
}
+LIBVLC_USED
+static inline void *__var_GetAddress( vlc_object_t *p_obj, const char *psz_name )
+{
+ vlc_value_t val;
+ if( var_GetChecked( p_obj, psz_name, VLC_VAR_ADDRESS, &val ) )
+ return NULL;
+ else
+ return val.p_address;
+}
/**
* __var_GetInteger() with automatic casting
@@ -438,6 +447,10 @@ static inline char *__var_GetNonEmptyString( vlc_object_t *p_obj, const char *ps
*/
#define var_GetString(a,b) __var_GetString( VLC_OBJECT(a),b)
#define var_GetNonEmptyString(a,b) __var_GetNonEmptyString( VLC_OBJECT(a),b)
+/**
+ * __var_GetAddress() with automatic casting
+ */
+#define var_GetAddress(a,b) __var_GetAddress( VLC_OBJECT(a),b)
More information about the vlc-devel
mailing list