diff options
Diffstat (limited to 'src/data_array.c')
-rw-r--r-- | src/data_array.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/data_array.c b/src/data_array.c index 9dfa6fd..c07effb 100644 --- a/src/data_array.c +++ b/src/data_array.c @@ -17,16 +17,16 @@ static data_unset *data_array_copy(const data_unset *s) { static void data_array_free(data_unset *d) { data_array *ds = (data_array *)d; - + buffer_free(ds->key); array_free(ds->value); - + free(d); } static void data_array_reset(data_unset *d) { data_array *ds = (data_array *)d; - + /* reused array elements */ buffer_reset(ds->key); array_reset(ds->value); @@ -36,7 +36,7 @@ static int data_array_insert_dup(data_unset *dst, data_unset *src) { UNUSED(dst); src->free(src); - + return 0; } @@ -48,18 +48,18 @@ static void data_array_print(const data_unset *d, int depth) { data_array *data_array_init(void) { data_array *ds; - + ds = calloc(1, sizeof(*ds)); - + ds->key = buffer_init(); ds->value = array_init(); - + ds->copy = data_array_copy; ds->free = data_array_free; ds->reset = data_array_reset; ds->insert_dup = data_array_insert_dup; ds->print = data_array_print; ds->type = TYPE_ARRAY; - + return ds; } |