From: Matthew Fernandez Date: Fri, 18 Nov 2022 01:14:41 +0000 (-0800) Subject: twopigen push: use cgraph wrapper for allocation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9ed19aa60e197689d133d62461a9b310aa0dbe25;p=graphviz 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. --- 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;