[vlc-devel] commit: Partially cleanup old module_list_cat hack ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Jan 27 22:09:56 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Tue Jan 27 21:45:35 2009 +0200| [824bc1c03688269e0a33c0e5e2459f81dc907f0b] | committer: Rémi Denis-Courmont 

Partially cleanup old module_list_cat hack

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

 include/vlc_plugin.h |    4 ++--
 src/modules/entry.c  |    4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h
index 76e630f..2725e3a 100644
--- a/include/vlc_plugin.h
+++ b/include/vlc_plugin.h
@@ -326,12 +326,12 @@ enum vlc_config_properties
 #define add_module_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \
     add_string_inner( CONFIG_ITEM_MODULE_CAT, name, text, longtext, advc, \
                       p_callback, value ) \
-    p_config->min.i = i_subcategory /* gruik */;
+    change_integer_range (i_subcategory /* gruik */, 0);
 
 #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, \
                       advc, p_callback, value ) \
-    p_config->min.i = i_subcategory /* gruik */;
+    change_integer_range (i_subcategory /* gruik */, 0);
 #endif
 
 #define add_integer( name, value, p_callback, text, longtext, advc ) \
diff --git a/src/modules/entry.c b/src/modules/entry.c
index 947803b..028fd10 100644
--- a/src/modules/entry.c
+++ b/src/modules/entry.c
@@ -299,7 +299,9 @@ int vlc_config_set (module_config_t *restrict item, int id, ...)
 
         case VLC_CONFIG_RANGE:
         {
-            if (IsConfigIntegerType (item->i_type))
+            if (IsConfigIntegerType (item->i_type)
+             || item->i_type == CONFIG_ITEM_MODULE_LIST_CAT
+             || item->i_type == CONFIG_ITEM_MODULE_CAT)
             {
                 item->min.i = va_arg (ap, int);
                 item->max.i = va_arg (ap, int);




More information about the vlc-devel mailing list