Files
ground-rewrite/src/New/List.c

17 lines
377 B
C
Raw Normal View History

2026-06-13 19:45:36 +10:00
#include "../../include/ground.h"
2026-06-20 19:45:52 +10:00
GroundList _GroundNewList(GroundSize len, GroundValue* contents) {
2026-06-13 19:45:36 +10:00
GroundList list = {
.capacity = 16,
.count = 0,
.at = malloc(sizeof(GroundValue) * 16)
};
if (list.at == NULL) {
2026-06-15 20:27:50 +10:00
Ground.Log.Error("malloc failed in Ground.New.List()");
2026-06-13 19:45:36 +10:00
Ground.Flags.error = true;
}
return list;
}