Commit 1b874401 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

module_GetConfig, module_PutConfig: copy configuration data for a module

parent 2a6cb11e
......@@ -146,12 +146,14 @@ LocaleFree
mdate
__module_Exists
__module_FindName
module_GetConfig
module_GetHelp
module_GetName
module_GetObjName
module_IsCapable
__module_Need
module_Put
module_PutConfig
__module_Unneed
__msg_Dbg
__msg_Err
......
......@@ -791,6 +791,25 @@ char ** __module_GetModulesNamesForCapability( vlc_object_t *p_this,
}
module_config_t *module_GetConfig (const module_t *module, unsigned *restrict psize)
{
unsigned size = module->confsize;
assert (psize != NULL);
*psize = size;
module_config_t *config = malloc (size * sizeof (*config));
if (config)
memcpy (config, module->p_config, size * sizeof (*config));
return config;
}
void module_PutConfig (module_config_t *config)
{
free (config);
}
/*****************************************************************************
* Following functions are local.
*****************************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment