mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
modules: get rid of struct module_info
Since this struct only contained function pointers, make all modules export those functions directly. The plugin manager now defines a module interface struct, and fills it it by dlsym:ing the functions that used to be in module_info.
This commit is contained in:
parent
07b1615a41
commit
bc62843c91
16 changed files with 57 additions and 111 deletions
|
@ -335,17 +335,17 @@ verify_module(keychain_t *chain, const struct yml_node *node)
|
|||
return false;
|
||||
}
|
||||
|
||||
const struct module_info *info = plugin_load_module(mod_name);
|
||||
if (info == NULL) {
|
||||
const struct module_iface *iface = plugin_load_module(mod_name);
|
||||
if (iface == NULL) {
|
||||
LOG_ERR(
|
||||
"%s: invalid module name: %s", conf_err_prefix(chain, node), mod_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
assert(info->verify_conf != NULL);
|
||||
assert(iface->verify_conf != NULL);
|
||||
|
||||
chain_push(chain, mod_name);
|
||||
if (!info->verify_conf(chain, values))
|
||||
if (!iface->verify_conf(chain, values))
|
||||
return false;
|
||||
|
||||
chain_pop(chain);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue