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~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57ef799441e61f75cb55a6c727c66037bddf7e2d;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/deglist.c b/lib/circogen/deglist.c index 7ca98b73c..3acaf7725 100644 --- a/lib/circogen/deglist.c +++ b/lib/circogen/deglist.c @@ -8,7 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ - +#include #include #include #include @@ -25,7 +25,7 @@ static degitem *mkItem(Dt_t * d, degitem * obj, Dtdisc_t * disc) (void)d; (void)disc; - degitem *ap = GNEW(degitem); + degitem *ap = gv_alloc(sizeof(degitem)); ap->np = NULL; ap->deg = obj->deg;