From ec468f1550229887eab57fc77ac51e2b9de03c87 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 16 Sep 2022 17:45:07 -0700 Subject: [PATCH] glcomp glCompPanelNew: 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/glcomppanel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/glcomp/glcomppanel.c b/lib/glcomp/glcomppanel.c index d8d20499e..109677d24 100644 --- a/lib/glcomp/glcomppanel.c +++ b/lib/glcomp/glcomppanel.c @@ -8,18 +8,17 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#include #include #include #include #include #include -#include glCompPanel *glCompPanelNew(glCompObj * parentObj, GLfloat x, GLfloat y, GLfloat w, GLfloat h) { - glCompPanel *p; - p = NEW(glCompPanel); + glCompPanel *p = gv_alloc(sizeof(glCompPanel)); glCompInitCommon((glCompObj *) p, parentObj, x, y); p->shadowcolor.R = GLCOMPSET_PANEL_SHADOW_COLOR_R; -- 2.40.0