From: Matthew Fernandez Date: Sat, 17 Sep 2022 00:45:07 +0000 (-0700) Subject: glcomp glCompPanelNew: use cgraph wrapper for allocation X-Git-Tag: 6.0.2~33^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec468f1550229887eab57fc77ac51e2b9de03c87;p=graphviz 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. --- 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;