From: Matthew Fernandez Date: Fri, 18 Nov 2022 01:14:41 +0000 (-0800) Subject: circogen circomps: use cgraph wrapper for allocation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ac347fa1b6448b888c259358b529e769516bccb;p=graphviz circogen circomps: 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/circogen/circularinit.c b/lib/circogen/circularinit.c index f82e59080..de77a1549 100644 --- a/lib/circogen/circularinit.c +++ b/lib/circogen/circularinit.c @@ -150,7 +150,7 @@ static Agraph_t **circomps(Agraph_t * g, int *cnt) /* Finally, add edge data to edges */ for (n = agfstnode(dg); n; n = agnxtnode(dg, n)) { for (e = agfstout(dg, n); e; e = agnxtout(dg, e)) { - ED_alg(e) = NEW(edata); + ED_alg(e) = gv_alloc(sizeof(edata)); } }