From 02f9f1bbd490ed2ee5d475b362bd85babed8e894 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 16 Sep 2022 17:41:23 -0700 Subject: [PATCH] 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. --- lib/glcomp/glcomplabel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; -- 2.40.0