From: Matthew Fernandez Date: Sun, 20 Nov 2022 20:02:53 +0000 (-0800) Subject: circogen init_nodelistitem: use cgraph wrapper for allocation X-Git-Tag: 7.0.3~2^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71eb2368806f4213f01d0b953d0d2e6279f5e264;p=graphviz circogen init_nodelistitem: 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/nodelist.c b/lib/circogen/nodelist.c index b943e6d10..94c13612d 100644 --- a/lib/circogen/nodelist.c +++ b/lib/circogen/nodelist.c @@ -8,14 +8,14 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ - +#include #include #include #include static nodelistitem_t *init_nodelistitem(Agnode_t * n) { - nodelistitem_t *p = NEW(nodelistitem_t); + nodelistitem_t *p = gv_alloc(sizeof(nodelistitem_t)); p->curr = n; return p; }