]> git.sesse.net Git - vlc/blobdiff - include/vlc_modules_macros.h
Remove VLCOPT support from M3U parser.
[vlc] / include / vlc_modules_macros.h
index 0f46a1d3f8671ac1ff95dc6b542c67240c8a4b71..6bb7dd1ec35615b420ad37485892d96b58bcb560 100644 (file)
@@ -41,7 +41,7 @@
  * if user has #defined MODULE_NAME foo, then we will need:
  * #define MODULE_STRING "foo"
  *
- * and, if __BUILTIN__ is set, we will also need:
+ * and, if HAVE_DYNAMIC_PLUGINS is NOT set, we will also need:
  * #define MODULE_FUNC( zog ) module_foo_zog
  *
  * this can't easily be done with the C preprocessor, thus a few ugly hacks.
 
 /* If the module is built-in, then we need to define foo_InitModule instead
  * of InitModule. Same for Activate- and DeactivateModule. */
-#if defined( __BUILTIN__ )
-#   define E_( function )          CONCATENATE( function, MODULE_NAME )
-#   define __VLC_SYMBOL( symbol )  CONCATENATE( symbol, MODULE_NAME )
-#elif defined( __PLUGIN__ )
+#if defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
 #   define E_( function )          CONCATENATE( function, MODULE_SYMBOL )
 #   define __VLC_SYMBOL( symbol  ) CONCATENATE( symbol, MODULE_SYMBOL )
+#else
+#   define E_( function )          CONCATENATE( function, MODULE_NAME )
+#   define __VLC_SYMBOL( symbol )  CONCATENATE( symbol, MODULE_NAME )
 #endif
 
 #if defined( __PLUGIN__ ) && ( defined( WIN32 ) || defined( UNDER_CE ) )
@@ -143,7 +143,7 @@ E_(vlc_entry) ( module_t *p_module );
 
 #define add_requirement( cap ) \
     if (vlc_module_set (p_module, VLC_MODULE_CPU_REQUIREMENT, \
-                        (void *)(CPU_CAPABILITY_##cap))) goto error
+                        (void *)(intptr_t)(CPU_CAPABILITY_##cap))) goto error
 
 #define add_shortcut( shortcut ) \
     if (vlc_module_set (p_submodule, VLC_MODULE_SHORTCUT, (void*)(shortcut))) \
@@ -155,7 +155,7 @@ E_(vlc_entry) ( module_t *p_module );
 
 #define set_description( desc ) \
     if (vlc_module_set (p_submodule, VLC_MODULE_DESCRIPTION, (void*)(desc))) \
-        goto error;
+        goto error
 
 #define set_help( help ) \
     if (vlc_module_set (p_submodule, VLC_MODULE_HELP, (void*)(help))) \
@@ -163,7 +163,8 @@ E_(vlc_entry) ( module_t *p_module );
 
 #define set_capability( cap, score ) \
     if (vlc_module_set (p_submodule, VLC_MODULE_CAPABILITY, (void *)(cap)) \
-     || vlc_module_set (p_submodule, VLC_MODULE_SCORE, (void *)(score))) \
+     || vlc_module_set (p_submodule, VLC_MODULE_SCORE, \
+                        (void *)(intptr_t)(score))) \
         goto error
 
 #define set_program( program ) \