[vlc-commits] variables: privatize internal variable data types

Rémi Denis-Courmont git at videolan.org
Thu May 21 19:32:59 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 21 20:23:06 2015 +0300| [499145b80d6f93de746628d90cf168847635ed14] | committer: Rémi Denis-Courmont

variables: privatize internal variable data types

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

 src/misc/variables.c |   55 +++++++++++++++++++++++++++++++++++++++++++++++++-
 src/misc/variables.h |   54 -------------------------------------------------
 2 files changed, 54 insertions(+), 55 deletions(-)

diff --git a/src/misc/variables.c b/src/misc/variables.c
index 4ac7ddd..86e570e 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -45,7 +45,8 @@
 /*****************************************************************************
  * Private types
  *****************************************************************************/
-struct callback_entry_t
+
+typedef struct callback_entry_t
 {
     union
     {
@@ -54,6 +55,58 @@ struct callback_entry_t
         void *               p_callback;
     } u;
     void *         p_data;
+} callback_entry_t;
+
+typedef struct variable_ops_t
+{
+    int  (*pf_cmp) ( vlc_value_t, vlc_value_t );
+    void (*pf_dup) ( vlc_value_t * );
+    void (*pf_free) ( vlc_value_t * );
+} variable_ops_t;
+
+typedef struct callback_table_t
+{
+    int                i_entries;
+    callback_entry_t * p_entries;
+} callback_table_t;
+
+/**
+ * The structure describing a variable.
+ * \note vlc_value_t is the common union for variable values
+ */
+struct variable_t
+{
+    char *       psz_name; /**< The variable unique name (must be first) */
+
+    /** The variable's exported value */
+    vlc_value_t  val;
+
+    /** The variable display name, mainly for use by the interfaces */
+    char *       psz_text;
+
+    const variable_ops_t *ops;
+
+    int          i_type;   /**< The type of the variable */
+    unsigned     i_usage;  /**< Reference count */
+
+    /** If the variable has min/max/step values */
+    vlc_value_t  min, max, step;
+
+    /** Index of the default choice, if the variable is to be chosen in
+     * a list */
+    int          i_default;
+    /** List of choices */
+    vlc_list_t   choices;
+    /** List of friendly names for the choices */
+    vlc_list_t   choices_text;
+
+    /** Set to TRUE if the variable is in a callback */
+    bool   b_incallback;
+
+    /** Registered value callbacks */
+    callback_table_t    value_callbacks;
+    /** Registered list callbacks */
+    callback_table_t    list_callbacks;
 };
 
 /*****************************************************************************
diff --git a/src/misc/variables.h b/src/misc/variables.h
index 6cdce0c..c60a79c 100644
--- a/src/misc/variables.h
+++ b/src/misc/variables.h
@@ -58,60 +58,6 @@ struct vlc_object_internals
 
 void DumpVariables(vlc_object_t *obj);
 
-typedef struct callback_entry_t callback_entry_t;
-
-typedef struct variable_ops_t
-{
-    int  (*pf_cmp) ( vlc_value_t, vlc_value_t );
-    void (*pf_dup) ( vlc_value_t * );
-    void (*pf_free) ( vlc_value_t * );
-} variable_ops_t;
-
-typedef struct callback_table_t
-{
-    int                i_entries;
-    callback_entry_t * p_entries;
-} callback_table_t;
-
-/**
- * The structure describing a variable.
- * \note vlc_value_t is the common union for variable values
- */
-struct variable_t
-{
-    char *       psz_name; /**< The variable unique name (must be first) */
-
-    /** The variable's exported value */
-    vlc_value_t  val;
-
-    /** The variable display name, mainly for use by the interfaces */
-    char *       psz_text;
-
-    const variable_ops_t *ops;
-
-    int          i_type;   /**< The type of the variable */
-    unsigned     i_usage;  /**< Reference count */
-
-    /** If the variable has min/max/step values */
-    vlc_value_t  min, max, step;
-
-    /** Index of the default choice, if the variable is to be chosen in
-     * a list */
-    int          i_default;
-    /** List of choices */
-    vlc_list_t   choices;
-    /** List of friendly names for the choices */
-    vlc_list_t   choices_text;
-
-    /** Set to TRUE if the variable is in a callback */
-    bool   b_incallback;
-
-    /** Registered value callbacks */
-    callback_table_t    value_callbacks;
-    /** Registered list callbacks */
-    callback_table_t    list_callbacks;
-};
-
 extern void var_DestroyAll( vlc_object_t * );
 
 #endif



More information about the vlc-commits mailing list