Files
tlibtoml/src/TomlArray.c

21 lines
553 B
C

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "toml_internal.h"
TomlArray* TomlArray_new(void)
{
TomlArray* array = (TomlArray*)malloc(sizeof(TomlArray));
*array = List_TomlValue_construct(NULL, 0, 0);
return array;
}
void TomlArray_free(TomlArray* self)
{
if(!self)
return;
List_TomlValue_destroyWithElements(self, TomlValue_destroy);
free(self);
}