From: Matthew Fernandez Date: Sat, 17 Sep 2022 00:43:26 +0000 (-0700) Subject: glcomp glCompImageNew: use cgraph wrapper for allocation X-Git-Tag: 6.0.2~33^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4ba8095ecb6f73cc2e9d1f8e0fe174adacccf0e;p=graphviz glcomp glCompImageNew: 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/glcompimage.c b/lib/glcomp/glcompimage.c index 291a9c052..a22f8afed 100644 --- a/lib/glcomp/glcompimage.c +++ b/lib/glcomp/glcompimage.c @@ -8,17 +8,16 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#include #include #include #include #include #include -#include glCompImage *glCompImageNew(glCompObj * par, GLfloat x, GLfloat y) { - glCompImage *p; - p = NEW(glCompImage); + glCompImage *p = gv_alloc(sizeof(glCompImage)); glCompInitCommon((glCompObj *) p, par, x, y); p->objType = glImageObj;