From: Matthew Fernandez Date: Sat, 17 Sep 2022 00:39:34 +0000 (-0700) Subject: glcomp glCompSetNew: use cgraph wrapper for allocation X-Git-Tag: 6.0.2~33^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=98971de108833da1eef61389a1212c4ecce34b98;p=graphviz glcomp glCompSetNew: 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/glcomp/glcompset.c b/lib/glcomp/glcompset.c index 2f6a8c349..88ae68b59 100644 --- a/lib/glcomp/glcompset.c +++ b/lib/glcomp/glcompset.c @@ -8,8 +8,8 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#include #include -#include #include #include #include @@ -199,7 +199,7 @@ void glCompEmptyCommon(glCompCommon * c) glCompSet *glCompSetNew(int w, int h) { - glCompSet *s = NEW(glCompSet); + glCompSet *s = gv_alloc(sizeof(glCompSet)); glCompInitCommon((glCompObj *) s, NULL, 0.0f, 0.0f); s->common.width = (GLfloat) w; s->common.height = (GLfloat) h;