From 9ed19aa60e197689d133d62461a9b310aa0dbe25 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 17 Nov 2022 17:14:41 -0800 Subject: [PATCH] twopigen push: use cgraph wrapper for allocation The lib/cgraph/alloc.h wrappers are similar to the older lib/common/memory.h wrappers except (1) they are header-only and (2) they live in a directory (cgraph) that is at the root of the dependency tree. The long term plan is to replace all use of lib/common/memory.h with lib/cgraph/alloc.h. --- lib/twopigen/circle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/twopigen/circle.c b/lib/twopigen/circle.c index cfd809f1b..91488722d 100644 --- a/lib/twopigen/circle.c +++ b/lib/twopigen/circle.c @@ -8,6 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#include #include #include #include @@ -120,7 +121,7 @@ typedef struct { } queue; static void push(queue* q, void* p) { - item_t* ip = NEW(item_t); + item_t* ip = gv_alloc(sizeof(item_t)); ip->p = p; if (q->tail) { /* non-empty q */ q->tail->s = ip; -- 2.40.0