From: Matthew Fernandez Date: Sat, 17 Sep 2022 00:33:13 +0000 (-0700) Subject: glcomp glNewFontFromParent: use cgraph wrapper for allocation X-Git-Tag: 6.0.2~33^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e004b54884d1a3f6d3a3971fc7994e684e19764;p=graphviz glcomp glNewFontFromParent: 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/glcompfont.c b/lib/glcomp/glcompfont.c index e023aff1a..d66a2b946 100644 --- a/lib/glcomp/glcompfont.c +++ b/lib/glcomp/glcompfont.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include @@ -81,7 +80,7 @@ glCompFont *glNewFont (glCompSet * s, char *text, glCompColor * c,glCompFontType glCompFont *glNewFontFromParent(glCompObj * o, char *text) { glCompCommon *parent; - glCompFont *font = NEW(glCompFont); + glCompFont *font = gv_alloc(sizeof(glCompFont)); parent = o->common.parent; if (parent) { parent = o->common.parent;