mie: implement value type initialiser functions

This commit is contained in:
2025-04-11 13:40:54 +01:00
parent 98d82de47a
commit 377444ef59
10 changed files with 424 additions and 7 deletions

19
mie/record.c Normal file
View File

@@ -0,0 +1,19 @@
#include <mie/record.h>
#include <stdlib.h>
#include <string.h>
struct mie_record *mie_record_create(const struct mie_const *val)
{
struct mie_record *out = malloc(sizeof *out);
if (!out) {
return NULL;
}
memset(out, 0x0, sizeof *out);
mie_value_init(&out->r_base, MIE_VALUE_RECORD);
out->r_value = val;
mie_value_retain(MIE_VALUE(out->r_value));
return out;
}