| 9 | #include "../../util/rmalloc.h" |
| 10 | |
| 11 | Path *Path_New(size_t len) { |
| 12 | Path *path = rm_malloc(sizeof(Path)); |
| 13 | path->edges = array_new(Edge, len); |
| 14 | path->nodes = array_new(Node, len + 1); |
| 15 | return path; |
| 16 | } |
| 17 | |
| 18 | void Path_EnsureLen(Path *p, size_t len) { |
| 19 | p->nodes = array_ensure_len(p->nodes, len); |