allow plugins to be compiled into the f00bar main binary

This commit is contained in:
Daniel Eklöf 2019-01-14 20:57:03 +01:00
parent 00679dbeeb
commit 0d591fe5a1
25 changed files with 400 additions and 72 deletions

View file

@ -559,7 +559,7 @@ removables_new(struct particle *label, int left_spacing, int right_spacing)
}
struct module *
from_conf(const struct yml_node *node, struct conf_inherit inherited)
removables_from_conf(const struct yml_node *node, struct conf_inherit inherited)
{
const struct yml_node *content = yml_get_value(node, "content");
const struct yml_node *spacing = yml_get_value(node, "spacing");
@ -575,7 +575,7 @@ from_conf(const struct yml_node *node, struct conf_inherit inherited)
}
bool
verify_conf(keychain_t *chain, const struct yml_node *node)
removables_verify_conf(keychain_t *chain, const struct yml_node *node)
{
static const struct attr_info attrs[] = {
{"spacing", false, &conf_verify_int},
@ -588,3 +588,12 @@ verify_conf(keychain_t *chain, const struct yml_node *node)
return conf_verify_dict(chain, node, attrs);
}
#if defined(CORE_PLUGINS_AS_SHARED_LIBRARIES)
bool verify_conf(keychain_t *chain, const struct yml_node *node)
__attribute__((weak, alias("removables_verify_conf")));
struct deco *from_conf(const struct yml_node *node, struct conf_inherit inherited)
__attribute__((weak, alias("removables_from_conf")));
#endif