31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
struct CFWArray {
CFWObject obj;
void **data;
size_t size;
};
static void
ctor(void *ptr)
{
CFWArray *array = ptr;
array->data = NULL;
array->size = 0;
}
static void
dtor(void *ptr)
{
CFWArray *array = ptr;
size_t i;
|
|
|
>
>
>
>
>
>
>
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
struct CFWArray {
CFWObject obj;
void **data;
size_t size;
};
static bool
ctor(void *ptr, va_list args)
{
CFWArray *array = ptr;
void *obj;
array->data = NULL;
array->size = 0;
while ((obj = va_arg(args, void*)) != NULL)
if (!cfw_array_push(array, obj))
return false;
return true;
}
static void
dtor(void *ptr)
{
CFWArray *array = ptr;
size_t i;
|