[vlc-commits] macosx: adapt module_list_get calls for latest changes in core
David Fuhrmann
git at videolan.org
Sun Sep 30 22:02:54 CEST 2012
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Sep 30 21:53:20 2012 +0200| [766e381d0eabaf3d487c55f1b876408aed16b37e] | committer: David Fuhrmann
macosx: adapt module_list_get calls for latest changes in core
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=766e381d0eabaf3d487c55f1b876408aed16b37e
---
modules/gui/macosx/prefs_widgets.m | 15 +++++++++------
modules/gui/macosx/simple_prefs.m | 10 ++++++----
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index f3c6346..5c9e3e2 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -1269,8 +1269,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
size_t i_module_index;
module_t *p_parser, **p_list;
- p_list = module_list_get(NULL);
- for (i_module_index = 0; p_list[i_module_index]; i_module_index++) {
+ size_t count;
+ p_list = module_list_get(&count);
+ for (i_module_index = 0; i_module_index < count; i_module_index++) {
p_parser = p_list[i_module_index];
if (p_item->i_type == CONFIG_ITEM_MODULE) {
@@ -1311,8 +1312,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
/* build a list of available modules */
module_t *p_parser, **p_list;
- p_list = module_list_get(NULL);
- for (size_t i_index = 0; p_list[i_index]; i_index++) {
+ size_t count;
+ p_list = module_list_get(&count);
+ for (size_t i_index = 0; i_index < count; i_index++) {
p_parser = p_list[i_index];
if (p_item->i_type == CONFIG_ITEM_MODULE) {
@@ -2010,8 +2012,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
o_modulearray = [[NSMutableArray alloc] initWithCapacity:10];
/* build a list of available modules */
- p_list = module_list_get(NULL);
- for (i_module_index = 0; p_list[i_module_index]; i_module_index++) {
+ size_t count;
+ p_list = module_list_get(&count);
+ for (i_module_index = 0; i_module_index < count; i_module_index++) {
int i;
p_parser = p_list[i_module_index];
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 97c7c85..26b7625 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -370,7 +370,8 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
[object removeAllItems];
p_item = config_FindConfig(VLC_OBJECT(p_intf), name);
- p_list = module_list_get(NULL);
+ size_t count;
+ p_list = module_list_get(&count);
if (!p_item ||!p_list) {
if (p_list) module_list_free(p_list);
msg_Err(p_intf, "serious problem, item or list not found");
@@ -378,7 +379,7 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
}
[object addItemWithTitle: _NS("Default")];
- for (size_t i_index = 0; p_list[i_index]; i_index++) {
+ for (size_t i_index = 0; i_index < count; i_index++) {
p_parser = p_list[i_index];
if (module_provides(p_parser, p_item->psz_type)) {
[object addItemWithTitle: [NSString stringWithUTF8String: _(module_GetLongName(p_parser)) ?: ""]];
@@ -738,8 +739,9 @@ static inline void save_module_list(intf_thread_t * p_intf, id object, const cha
p_item = config_FindConfig(VLC_OBJECT(p_intf), name);
- p_list = module_list_get(NULL);
- for (size_t i_module_index = 0; p_list[i_module_index]; i_module_index++) {
+ size_t count;
+ p_list = module_list_get(&count);
+ for (size_t i_module_index = 0; i_module_index < count; i_module_index++) {
p_parser = p_list[i_module_index];
if (p_item->i_type == CONFIG_ITEM_MODULE && module_provides(p_parser, p_item->psz_type)) {
More information about the vlc-commits
mailing list