]> granicus.if.org Git - graphviz/commitdiff
Add and advertise a free function for dynamically allocated paths
authorEmden Gansner <erg@research.att.com>
Mon, 9 Jul 2012 21:08:20 +0000 (17:08 -0400)
committerEmden Gansner <erg@research.att.com>
Mon, 9 Jul 2012 21:08:20 +0000 (17:08 -0400)
lib/pathplan/pathgeom.h
lib/pathplan/util.c

index 270d41c67dddaf8dd911bccb7bd478e1eaf07e52..521578237a2641676f317e40aa519bef11bcc668 100644 (file)
@@ -45,6 +45,7 @@ extern "C" {
 /* opaque state handle for visibility graph operations */
     typedef struct vconfig_s vconfig_t;
 
+    void freePath(Ppolyline_t* p);
 #ifdef __cplusplus
 }
 #endif
index c3e7e65d50a83d6ca5c9d0e5139cea9246380c1d..e2d31ce10e1d5f711afefe8afefbcfeb665d02dc 100644 (file)
@@ -34,6 +34,12 @@ Ppoly_t copypoly(Ppoly_t argpoly)
     return rv;
 }
 
+void freePath(Ppolyline_t* p)
+{
+    free(p->ps);
+    free(p);
+}
+
 void freepoly(Ppoly_t argpoly)
 {
     free(argpoly.ps);