From: Matthew Fernandez Date: Sun, 20 Nov 2022 20:02:53 +0000 (-0800) Subject: circogen mkItem: use cgraph wrapper for allocation X-Git-Tag: 7.0.3~2^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51a3c9634b26c0e39b2514b1925ccb9b269be1a0;p=graphviz circogen mkItem: 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/edgelist.c b/lib/circogen/edgelist.c index ffd855ed1..5e0a1ea04 100644 --- a/lib/circogen/edgelist.c +++ b/lib/circogen/edgelist.c @@ -8,7 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ - +#include #include #include @@ -17,7 +17,7 @@ static edgelistitem *mkItem(Dt_t * d, edgelistitem * obj, Dtdisc_t * disc) (void)d; (void)disc; - edgelistitem *ap = GNEW(edgelistitem); + edgelistitem *ap = gv_alloc(sizeof(edgelistitem)); ap->edge = obj->edge; return ap;