Commit ac90e398 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Do not pass former callback value to VLC_CONFIG_NAME

parent e5622718
...@@ -120,8 +120,8 @@ enum vlc_module_properties ...@@ -120,8 +120,8 @@ enum vlc_module_properties
/** /**
* Current plugin ABI version * Current plugin ABI version
*/ */
# define MODULE_SYMBOL 1_2_0e # define MODULE_SYMBOL 1_2_0f
# define MODULE_SUFFIX "__1_2_0e" # define MODULE_SUFFIX "__1_2_0f"
/***************************************************************************** /*****************************************************************************
* Add a few defines. You do not want to read this section. Really. * Add a few defines. You do not want to read this section. Really.
...@@ -262,17 +262,17 @@ enum vlc_module_properties ...@@ -262,17 +262,17 @@ enum vlc_module_properties
add_typedesc_inner( type, text, longtext ) \ add_typedesc_inner( type, text, longtext ) \
if (advc) vlc_config_set (p_config, VLC_CONFIG_ADVANCED); if (advc) vlc_config_set (p_config, VLC_CONFIG_ADVANCED);
#define add_typename_inner( type, name, text, longtext, advc, cb ) \ #define add_typename_inner( type, name, text, longtext, advc ) \
add_typeadv_inner( type, text, longtext, advc ) \ add_typeadv_inner( type, text, longtext, advc ) \
vlc_config_set (p_config, VLC_CONFIG_NAME, \ vlc_config_set (p_config, VLC_CONFIG_NAME, \
(const char *)(name), (vlc_callback_t)(cb)); (const char *)(name));
#define add_string_inner( type, name, text, longtext, advc, cb, v ) \ #define add_string_inner( type, name, text, longtext, advc, v ) \
add_typename_inner( type, name, text, longtext, advc, cb ) \ add_typename_inner( type, name, text, longtext, advc ) \
vlc_config_set (p_config, VLC_CONFIG_VALUE, (const char *)(v)); vlc_config_set (p_config, VLC_CONFIG_VALUE, (const char *)(v));
#define add_int_inner( type, name, text, longtext, advc, cb, v ) \ #define add_int_inner( type, name, text, longtext, advc, v ) \
add_typename_inner( type, name, text, longtext, advc, cb ) \ add_typename_inner( type, name, text, longtext, advc ) \
vlc_config_set (p_config, VLC_CONFIG_VALUE, (int64_t)(v)); vlc_config_set (p_config, VLC_CONFIG_VALUE, (int64_t)(v));
...@@ -301,66 +301,64 @@ enum vlc_module_properties ...@@ -301,66 +301,64 @@ enum vlc_module_properties
#define add_string( name, value, p_callback, text, longtext, advc ) \ #define add_string( name, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_STRING, name, text, longtext, advc, \ add_string_inner( CONFIG_ITEM_STRING, name, text, longtext, advc, \
p_callback, value ) value )
#define add_password( name, value, p_callback, text, longtext, advc ) \ #define add_password( name, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_PASSWORD, name, text, longtext, advc, \ add_string_inner( CONFIG_ITEM_PASSWORD, name, text, longtext, advc, \
p_callback, value ) value )
#define add_loadfile( name, value, p_callback, text, longtext, advc ) \ #define add_loadfile( name, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_LOADFILE, name, text, longtext, advc, \ add_string_inner( CONFIG_ITEM_LOADFILE, name, text, longtext, advc, \
p_callback, value ) value )
#define add_savefile( name, value, p_callback, text, longtext, advc ) \ #define add_savefile( name, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_SAVEFILE, name, text, longtext, advc, \ add_string_inner( CONFIG_ITEM_SAVEFILE, name, text, longtext, advc, \
p_callback, value ) value )
#define add_directory( name, value, p_callback, text, longtext, advc ) \ #define add_directory( name, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_DIRECTORY, name, text, longtext, advc, \ add_string_inner( CONFIG_ITEM_DIRECTORY, name, text, longtext, advc, \
p_callback, value ) value )
#define add_font( name, value, p_callback, text, longtext, advc )\ #define add_font( name, value, p_callback, text, longtext, advc )\
add_string_inner( CONFIG_ITEM_FONT, name, text, longtext, advc, \ add_string_inner( CONFIG_ITEM_FONT, name, text, longtext, advc, \
p_callback, value ) value )
#define add_module( name, psz_caps, value, p_callback, text, longtext, advc ) \ #define add_module( name, psz_caps, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE, name, text, longtext, advc, \ add_string_inner( CONFIG_ITEM_MODULE, name, text, longtext, advc, \
p_callback, value ) \ value ) \
vlc_config_set (p_config, VLC_CONFIG_CAPABILITY, (const char *)(psz_caps)); vlc_config_set (p_config, VLC_CONFIG_CAPABILITY, (const char *)(psz_caps));
#define add_module_list( name, psz_caps, value, p_callback, text, longtext, advc ) \ #define add_module_list( name, psz_caps, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE_LIST, name, text, longtext, advc, \ add_string_inner( CONFIG_ITEM_MODULE_LIST, name, text, longtext, advc, \
p_callback, value ) \ value ) \
vlc_config_set (p_config, VLC_CONFIG_CAPABILITY, (const char *)(psz_caps)); vlc_config_set (p_config, VLC_CONFIG_CAPABILITY, (const char *)(psz_caps));
#ifndef __PLUGIN__ #ifndef __PLUGIN__
#define add_module_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \ #define add_module_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE_CAT, name, text, longtext, advc, \ add_string_inner( CONFIG_ITEM_MODULE_CAT, name, text, longtext, advc, \
p_callback, value ) \ value ) \
change_integer_range (i_subcategory /* gruik */, 0); change_integer_range (i_subcategory /* gruik */, 0);
#define add_module_list_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \ #define add_module_list_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \
add_string_inner( CONFIG_ITEM_MODULE_LIST_CAT, name, text, longtext, \ add_string_inner( CONFIG_ITEM_MODULE_LIST_CAT, name, text, longtext, \
advc, p_callback, value ) \ advc, value ) \
change_integer_range (i_subcategory /* gruik */, 0); change_integer_range (i_subcategory /* gruik */, 0);
#endif #endif
#define add_integer( name, value, p_callback, text, longtext, advc ) \ #define add_integer( name, value, p_callback, text, longtext, advc ) \
add_int_inner( CONFIG_ITEM_INTEGER, name, text, longtext, advc, \ add_int_inner( CONFIG_ITEM_INTEGER, name, text, longtext, advc, value )
p_callback, value )
#define add_key( name, value, p_callback, text, longtext, advc ) \ #define add_key( name, value, p_callback, text, longtext, advc ) \
add_int_inner( CONFIG_ITEM_KEY, name, text, longtext, advc, \ add_int_inner( CONFIG_ITEM_KEY, name, text, longtext, advc, value ) \
p_callback, value ) \
add_int_inner( CONFIG_ITEM_KEY, "global-" name, text, longtext, advc, \ add_int_inner( CONFIG_ITEM_KEY, "global-" name, text, longtext, advc, \
p_callback, KEY_UNSET ) KEY_UNSET )
#define add_integer_with_range( name, value, i_min, i_max, p_callback, text, longtext, advc ) \ #define add_integer_with_range( name, value, i_min, i_max, p_callback, text, longtext, advc ) \
add_integer( name, value, p_callback, text, longtext, advc ) \ add_integer( name, value, p_callback, text, longtext, advc ) \
change_integer_range( i_min, i_max ) change_integer_range( i_min, i_max )
#define add_float( name, v, p_callback, text, longtext, advc ) \ #define add_float( name, v, p_callback, text, longtext, advc ) \
add_typename_inner( CONFIG_ITEM_FLOAT, name, text, longtext, advc, p_callback ) \ add_typename_inner( CONFIG_ITEM_FLOAT, name, text, longtext, advc ) \
vlc_config_set (p_config, VLC_CONFIG_VALUE, (double)(v)); vlc_config_set (p_config, VLC_CONFIG_VALUE, (double)(v));
#define add_float_with_range( name, value, f_min, f_max, p_callback, text, longtext, advc ) \ #define add_float_with_range( name, value, f_min, f_max, p_callback, text, longtext, advc ) \
...@@ -368,15 +366,14 @@ enum vlc_module_properties ...@@ -368,15 +366,14 @@ enum vlc_module_properties
change_float_range( f_min, f_max ) change_float_range( f_min, f_max )
#define add_bool( name, v, p_callback, text, longtext, advc ) \ #define add_bool( name, v, p_callback, text, longtext, advc ) \
add_typename_inner( CONFIG_ITEM_BOOL, name, text, longtext, advc, \ add_typename_inner( CONFIG_ITEM_BOOL, name, text, longtext, advc ) \
p_callback ) \
if (v) vlc_config_set (p_config, VLC_CONFIG_VALUE, (int64_t)true); if (v) vlc_config_set (p_config, VLC_CONFIG_VALUE, (int64_t)true);
/* For removed option */ /* For removed option */
#define add_obsolete_inner( name, type ) \ #define add_obsolete_inner( name, type ) \
add_type_inner( type ) \ add_type_inner( type ) \
vlc_config_set (p_config, VLC_CONFIG_NAME, \ vlc_config_set (p_config, VLC_CONFIG_NAME, \
(const char *)(name), (vlc_callback_t)NULL); \ (const char *)(name)); \
vlc_config_set (p_config, VLC_CONFIG_REMOVED); vlc_config_set (p_config, VLC_CONFIG_REMOVED);
#define add_obsolete_bool( name ) \ #define add_obsolete_bool( name ) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment