cfw_new() takes parameters now.

This commit is contained in:
Jonathan Schleifer 2012-04-08 19:32:57 +02:00
parent 8603645700
commit a9e4c2a8d9
6 changed files with 43 additions and 31 deletions

View file

@ -35,13 +35,20 @@ struct CFWArray {
size_t size;
};
static void
ctor(void *ptr)
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