*****************************************************************************/
static void DupModule( module_t *p_module )
{
- const char **pp_shortcut;
+ char **pp_shortcut;
int i_submodule;
for( pp_shortcut = p_module->pp_shortcuts ; *pp_shortcut ; pp_shortcut++ )
/* We strdup() these entries so that they are still valid when the
* module is unloaded. */
- p_module->psz_object_name = strdup( p_module->psz_object_name );
+ /* This one is a (const char *) that will never get freed. */
+ p_module->psz_object_name = p_module->psz_object_name;
p_module->psz_capability = strdup( p_module->psz_capability );
p_module->psz_shortname = p_module->psz_shortname ?
strdup( p_module->psz_shortname ) : NULL;
*****************************************************************************/
static void UndupModule( module_t *p_module )
{
- const char **pp_shortcut;
+ char **pp_shortcut;
int i_submodule;
for( i_submodule = 0; i_submodule < p_module->i_children; i_submodule++ )
free( *pp_shortcut );
}
- free( p_module->psz_object_name );
free( p_module->psz_capability );
free( p_module->psz_shortname );
free( p_module->psz_longname );
/*
* Variables set by the module to identify itself
*/
- const char *psz_shortname; /**< Module name */
- const char *psz_longname; /**< Module descriptive name */
- const char *psz_help; /**< Long help string for "special" modules */
+ char *psz_shortname; /**< Module name */
+ char *psz_longname; /**< Module descriptive name */
+ char *psz_help; /**< Long help string for "special" modules */
/** Shortcuts to the module */
- const char *pp_shortcuts[ MODULE_SHORTCUT_MAX ];
+ char *pp_shortcuts[ MODULE_SHORTCUT_MAX ];
char *psz_capability; /**< Capability */
int i_score; /**< Score for the capability */