23 lines
356 B
C
23 lines
356 B
C
|
#include "array.h"
|
||
|
#include "value.h"
|
||
|
|
||
|
void array_init(struct array* self)
|
||
|
{
|
||
|
assert(self);
|
||
|
vec_init(&self->values);
|
||
|
}
|
||
|
|
||
|
void array_free(struct array* self)
|
||
|
{
|
||
|
assert(self);
|
||
|
vec_free(&self->values);
|
||
|
}
|
||
|
|
||
|
void array_push_value(struct array* self, MOKA value)
|
||
|
{
|
||
|
assert(self);
|
||
|
assert(value);
|
||
|
|
||
|
vec_push(&self->values, (void*) value);
|
||
|
}
|