# define MODULE_NAME main
#endif
+/**
+ * Current plugin ABI version
+ */
+# define MODULE_SYMBOL 0_9_0j
+# define MODULE_SUFFIX "__0_9_0j"
+
/*****************************************************************************
* Add a few defines. You do not want to read this section. Really.
*****************************************************************************/
* 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 )
-#endif
-
-#if defined( __BUILTIN__ ) || defined( HAVE_SHARED_LIBVLC )
-# define DECLARE_SYMBOLS struct _u_n_u_s_e_d_
-# define STORE_SYMBOLS struct _u_n_u_s_e_d_
#else
-# define DECLARE_SYMBOLS module_symbols_t* p_symbols = NULL
-# define STORE_SYMBOLS p_symbols = p_module->p_symbols
+# define E_( function ) CONCATENATE( function, MODULE_NAME )
+# define __VLC_SYMBOL( symbol ) CONCATENATE( symbol, MODULE_NAME )
#endif
#if defined( __PLUGIN__ ) && ( defined( WIN32 ) || defined( UNDER_CE ) )
# define DLL_SYMBOL __declspec(dllexport)
# define CDECL_SYMBOL __cdecl
-#elif HAVE_ATTRIBUTE_VISIBILITY
+#elif defined (HAVE_ATTRIBUTE_VISIBILITY)
# define DLL_SYMBOL __attribute__((visibility("default")))
# define CDECL_SYMBOL
#else
#endif
#define vlc_module_begin( ) \
- DECLARE_SYMBOLS; \
EXTERN_SYMBOL DLL_SYMBOL int CDECL_SYMBOL \
__VLC_SYMBOL(vlc_entry) ( module_t *p_module ) \
{ \
- int i_shortcut = 1, res; \
- size_t i_config = (size_t)(-1); \
module_config_t *p_config = NULL; \
- STORE_SYMBOLS; \
if (vlc_module_set (p_module, VLC_MODULE_NAME, \
(void *)(MODULE_STRING))) \
goto error; \
module_t *p_submodule = p_module /* the ; gets added */
#define vlc_module_end( ) \
- p_submodule->pp_shortcuts[ i_shortcut ] = NULL; \
- } \
- res = config_Duplicate( p_module, p_config, ++i_config ); \
- for( size_t i = 0; i < i_config; i++ ) \
- { \
- if( p_config[ i ].i_action ) \
- { \
- free( p_config[ i ].ppf_action ); \
- free( p_config[ i ].ppsz_action_text ); \
- } \
} \
- free( p_config ); \
- if (res) \
- return res; \
- (void)i_shortcut; \
+ (void)p_config; \
return VLC_SUCCESS; \
\
error: \
- free( p_config ); \
+ /* FIXME: config_Free( p_module ); */ \
/* FIXME: cleanup submodules objects ??? */ \
return VLC_EGENERIC; \
} \
#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))) \
#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))) \
#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))) \
- goto error
-
-#define set_program( program ) \
- if (vlc_module_set (p_submodule, VLC_MODULE_PROGRAM, (void *)(program))) \
+ || vlc_module_set (p_submodule, VLC_MODULE_SCORE, \
+ (void *)(intptr_t)(score))) \
goto error
#define set_callbacks( activate, deactivate ) \