From: Matthew Fernandez Date: Sat, 17 Sep 2022 00:41:23 +0000 (-0700) Subject: glcomp glCompLabelNew: use cgraph wrapper for allocation X-Git-Tag: 6.0.2~33^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02f9f1bbd490ed2ee5d475b362bd85babed8e894;p=graphviz glcomp glCompLabelNew: 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/glcomplabel.c b/lib/glcomp/glcomplabel.c index ac956b35b..0642925b5 100644 --- a/lib/glcomp/glcomplabel.c +++ b/lib/glcomp/glcomplabel.c @@ -8,17 +8,16 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#include #include #include #include #include -#include glCompLabel *glCompLabelNew(glCompObj * par, GLfloat x, GLfloat y, char *text) { - glCompLabel *p; - p = NEW(glCompLabel); + glCompLabel *p = gv_alloc(sizeof(glCompLabel)); glCompInitCommon((glCompObj *) p, par, x, y); p->objType = glLabelObj; p->transparent=1;