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:
11
mie/module.c
11
mie/module.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user