[vlc-devel] [PATCH 2/8] typedef va_arg function pointers to avoid compiler parse errors

Francois Cartegnie fcvlcdev at free.fr
Wed Apr 14 16:53:14 CEST 2010


---
 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:
-- 
1.6.3




More information about the vlc-devel mailing list