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

plugin: match prototypes for callbacks as variable args

Cast was missing, leading to mismatch.
parent f4277df9
......@@ -299,8 +299,9 @@ VLC_METADATA_EXPORTS
goto error;
#define set_callbacks( activate, deactivate ) \
if (vlc_module_set (VLC_MODULE_CB_OPEN, #activate, activate) \
|| vlc_module_set (VLC_MODULE_CB_CLOSE, #deactivate, deactivate)) \
if (vlc_module_set(VLC_MODULE_CB_OPEN, #activate, (void *)(activate)) \
|| vlc_module_set(VLC_MODULE_CB_CLOSE, #deactivate, \
(void *)(deactivate))) \
goto error;
#define cannot_unload_broken_library( ) \
......@@ -470,7 +471,7 @@ VLC_METADATA_EXPORTS
(const char *const *)(list_text));
#define change_string_cb( cb ) \
vlc_config_set (VLC_CONFIG_LIST_CB, #cb, (cb));
vlc_config_set (VLC_CONFIG_LIST_CB, #cb, (void *)(cb));
#define change_integer_list( list, list_text ) \
vlc_config_set (VLC_CONFIG_LIST, \
......
......@@ -417,15 +417,21 @@ static int vlc_plugin_setter(void *ctx, void *tgt, int propid, ...)
}
case VLC_CONFIG_LIST_CB:
{
void *cb;
va_arg(ap, const char *);
cb = va_arg(ap, void *);
if (IsConfigIntegerType (item->i_type))
item->list.i_cb = va_arg (ap, vlc_integer_list_cb);
item->list.i_cb = cb;
else
if (IsConfigStringType (item->i_type))
item->list.psz_cb = va_arg (ap, vlc_string_list_cb);
item->list.psz_cb = cb;
else
break;
break;
}
default:
fprintf (stderr, "LibVLC: unknown module property %d\n", propid);
......
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