[vlc-devel] [PATCH 2/8] typedef va_arg function pointers to avoid compiler parse errors
Rémi Denis-Courmont
remi at remlab.net
Wed Apr 14 18:03:22 CEST 2010
Hmm, it's not clear to me whether the old code was legal or not, so I merged
the patch.
Le mercredi 14 avril 2010 17:53:14 Francois Cartegnie, vous avez écrit :
> ---
> src/modules/entry.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/modules/entry.c b/src/modules/entry.c
> index 7ed2697..0834ff9 100644
> --- a/src/modules/entry.c
> +++ b/src/modules/entry.c
> @@ -152,6 +152,8 @@ int vlc_plugin_set (module_t *module, module_config_t
> *item, int propid, ...) {
> va_list ap;
> int ret = 0;
> + typedef int(*int_fp_vlcobjectt)(vlc_object_t *) ;
> + typedef void(*void_fp_vlcobjectt)(vlc_object_t *);
>
> va_start (ap, propid);
> switch (propid)
> @@ -195,11 +197,11 @@ int vlc_plugin_set (module_t *module, module_config_t
> *item, int propid, ...) break;
>
> case VLC_MODULE_CB_OPEN:
> - module->pf_activate = va_arg (ap, int (*) (vlc_object_t *));
> + module->pf_activate = va_arg (ap, int_fp_vlcobjectt);
> break;
>
> case VLC_MODULE_CB_CLOSE:
> - module->pf_deactivate = va_arg (ap, void (*) (vlc_object_t
> *)); + module->pf_deactivate = va_arg (ap, void_fp_vlcobjectt);
> break;
>
> case VLC_MODULE_NO_UNLOAD:
>
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list