]> granicus.if.org Git - graphviz/commitdiff
neatogen newIpair: use cgraph wrapper for allocation
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 18 Nov 2022 01:14:02 +0000 (17:14 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 19 Nov 2022 05:29:08 +0000 (21:29 -0800)
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/neatogen/multispline.c

index 57eea9f89ba1851e7f7f7d384148099625cc10d9..a6a03970ab3ec634a2287508a551b743ffe2ff4a 100644 (file)
@@ -182,7 +182,7 @@ static int cmpIpair(Dt_t * d, int *p1, int *p2, Dtdisc_t * disc)
 
 static void *newIpair(Dt_t * d, Ipair * objp, Dtdisc_t * disc)
 {
-    Ipair *newp = NEW(Ipair);
+    Ipair *newp = gv_alloc(sizeof(Ipair));
 
     (void)d;
     (void)disc;