mie: func name and args are now specified separately from func creation

func args are added manually using mie_func_add_arg, while the func's name
is specified when the func is added to a module, to allow the module to generate
a unique name.
This commit is contained in:
2025-04-21 21:10:27 +01:00
parent 8febd270ba
commit 8023ea622a
8 changed files with 66 additions and 18 deletions

View File

@@ -25,9 +25,16 @@ struct mie_module *mie_module_create(void)
return out;
}
void mie_module_add_function(struct mie_module *mod, struct mie_func *func)
void mie_module_add_function(
struct mie_module *mod, struct mie_func *func, const char *name)
{
b_queue_push_back(&mod->m_func, &func->f_base.v_entry);
struct mie_value *v
= mie_module_generate_value_name(mod, MIE_VALUE(func), name);
if (!v) {
return;
}
b_queue_push_back(&mod->m_func, &v->v_entry);
}
struct mie_data *mie_module_get_string_ptr(struct mie_module *mod, const char *s)