Files
ground-rewrite/src/New/List.c
2026-06-15 20:27:50 +10:00

17 lines
373 B
C

#include "../../include/ground.h"
GroundList _GroundNewList(size_t len, GroundValue* contents) {
GroundList list = {
.capacity = 16,
.count = 0,
.at = malloc(sizeof(GroundValue) * 16)
};
if (list.at == NULL) {
Ground.Log.Error("malloc failed in Ground.New.List()");
Ground.Flags.error = true;
}
return list;
}