mie: implement more ir building functionality
This commit is contained in:
12
mie/record.c
12
mie/record.c
@@ -13,7 +13,17 @@ struct mie_record *mie_record_create(const struct mie_const *val)
|
||||
|
||||
mie_value_init(&out->r_base, MIE_VALUE_RECORD);
|
||||
out->r_value = val;
|
||||
mie_value_retain(MIE_VALUE(out->r_value));
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
static struct mie_type *get_type(struct mie_value *v)
|
||||
{
|
||||
struct mie_record *r = MIE_RECORD(v);
|
||||
return r->r_value->c_type;
|
||||
}
|
||||
|
||||
const struct mie_value_type record_value_type = {
|
||||
.t_id = MIE_VALUE_RECORD,
|
||||
.t_get_type = get_type,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user