firmware
v0.1.2
Chromation Spectrometer Dev-Kit
mock-c
code
RecordedCall.c
1
#include "RecordedCall.h"
2
#include "RecordedArg.h"
// RecordedArg
3
#include <stdlib.h>
// malloc, free
4
5
RecordedCall
* RecordedCall_new(
char
const
*name)
6
{
7
RecordedCall
*out = (
RecordedCall
*)malloc(
sizeof
(
RecordedCall
));
8
out->name = name;
9
out->inputs = NULL;
10
return
out;
11
}
12
void
RecordedCall_destroy(
RecordedCall
*
self
)
13
{
// Deallocate this recorded call.
14
g_list_free_full(
// Deallocate each GList struct and free the
15
self->inputs,
// RecordedArg that each data member points to.
16
(GDestroyNotify)RecordedArg_destroy
17
);
18
free(
self
);
// Deallocate the RecordedCall struct itself.
19
}
20
RecordedCall
Definition:
RecordedCall.h:8
Generated by
1.9.1