]> git.sesse.net Git - vlc/commitdiff
variables: add var_CreategetAddress.
authorRémi Duraffort <ivoire@videolan.org>
Sat, 10 Oct 2009 15:30:21 +0000 (17:30 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Sat, 10 Oct 2009 15:33:54 +0000 (17:33 +0200)
include/vlc_variables.h

index 5c84a7af2d2ee17a7b975a37adad71ddad6f8413..64876eee192dbf933cb6a2acded759d8d156c097 100644 (file)
@@ -554,6 +554,20 @@ static inline char *__var_CreateGetNonEmptyString( vlc_object_t *p_obj,
     return __var_GetNonEmptyString( p_obj, psz_name );
 }
 
+/**
+ * Create an address variable with inherit and get its value.
+ *
+ * \param p_obj The object that holds the variable
+ * \param psz_name The name of the variable
+ */
+LIBVLC_USED
+static inline char *__var_CreateGetAddress( vlc_object_t *p_obj,
+                                           const char *psz_name )
+{
+    __var_Create( p_obj, psz_name, VLC_VAR_ADDRESS | VLC_VAR_DOINHERIT );
+    return __var_GetAddress( p_obj, psz_name );
+}
+
 /**
  * __var_CreateGetInteger() with automatic casting
  */
@@ -575,6 +589,10 @@ static inline char *__var_CreateGetNonEmptyString( vlc_object_t *p_obj,
  */
 #define var_CreateGetString(a,b)   __var_CreateGetString( VLC_OBJECT(a),b)
 #define var_CreateGetNonEmptyString(a,b)   __var_CreateGetNonEmptyString( VLC_OBJECT(a),b)
+/**
+ * __var_CreateGetString() with automatic casting
+ */
+#define var_CreateGetAddress(a,b)  __var_CreateGetAddress( VLC_OBJECT(a),b)
 
 /**
  * Create a integer command variable with inherit and get its value.