* modules_inner.h : Macros used from within a module.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules_inner.h,v 1.38 2003/06/16 21:55:58 gbazin Exp $
+ * $Id: modules_inner.h,v 1.43 2004/01/09 12:23:47 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
# define DECLARE_SYMBOLS struct _u_n_u_s_e_d_
# define STORE_SYMBOLS struct _u_n_u_s_e_d_
#elif defined( __PLUGIN__ )
-# define E_( function ) function
+# define E_( function ) CONCATENATE( function, MODULE_SYMBOL )
# define __VLC_SYMBOL( symbol ) CONCATENATE( symbol, MODULE_SYMBOL )
# define DECLARE_SYMBOLS module_symbols_t* p_symbols
# define STORE_SYMBOLS p_symbols = p_module->p_symbols
EXTERN_SYMBOL DLL_SYMBOL int CDECL_SYMBOL \
__VLC_SYMBOL(vlc_entry) ( module_t *p_module ) \
{ \
- int i_shortcut = 1, i_config = 0; \
- module_config_t p_config[ 100 ]; \
+ int i_shortcut = 1, i_config = -1; \
+ module_config_t *p_config = NULL; \
+ static module_config_t config_end = {CONFIG_HINT_END}; \
STORE_SYMBOLS; \
p_module->b_submodule = VLC_FALSE; \
p_module->b_unloadable = VLC_TRUE; \
#define vlc_module_end( ) \
p_submodule->pp_shortcuts[ i_shortcut ] = NULL; \
} \
+ if( p_config ) \
{ \
- static module_config_t tmp = { CONFIG_HINT_END }; \
- p_config[ i_config ] = tmp; \
+ p_config[ ++i_config ] = config_end; \
+ config_Duplicate( p_module, p_config ); \
+ free( p_config ); \
} \
- config_Duplicate( p_module, p_config ); \
+ else config_Duplicate( p_module, &config_end ); \
if( p_module->p_config == NULL ) \
{ \
return VLC_EGENERIC; \