20 lines
375 B
C
20 lines
375 B
C
|
|
#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;
|
||
|
|
}
|