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
4
config.c
4
config.c
|
@ -340,8 +340,8 @@ conf_to_bar(const struct yml_node *bar)
|
|||
? conf_to_color(mod_foreground) : inherited.foreground,
|
||||
};
|
||||
|
||||
const struct module_info *info = plugin_load_module(mod_name);
|
||||
mods[idx] = info->from_conf(m.value, mod_inherit);
|
||||
const struct module_iface *iface = plugin_load_module(mod_name);
|
||||
mods[idx] = iface->from_conf(m.value, mod_inherit);
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue