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:
18
mie/arg.c
18
mie/arg.c
@@ -1,4 +1,22 @@
|
||||
#include <mie/arg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
struct mie_arg *mie_arg_create(struct mie_type *type)
|
||||
{
|
||||
struct mie_arg *out = malloc(sizeof *out);
|
||||
if (!out) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memset(out, 0x0, sizeof *out);
|
||||
|
||||
mie_value_init(&out->arg_base, MIE_VALUE_ARG);
|
||||
|
||||
out->arg_type = type;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
static struct mie_type *get_type(struct mie_value *v)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user