Files
ground-rewrite/src/New/List.c
2026-06-20 19:45:52 +10:00

17 lines
377 B
C

#include "../../include/ground.h"
GroundList _GroundNewList(GroundSize 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;
}