PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ test_clone()

static void test_clone ( void  )
static

Definition at line 213 of file liblwgeom/cunit/cu_misc.c.

214{
215 static char *wkt = "GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0, 10 0, 10 10, 0 10, 0 0))),POINT(1 1),LINESTRING(2 3,4 5))";
217 LWGEOM *geom2;
218
219 /* Free in "backwards" order */
220 geom2 = lwgeom_clone(geom1);
221 lwgeom_free(geom1);
222 lwgeom_free(geom2);
223
224 /* Free in "forewards" order */
226 geom2 = lwgeom_clone(geom1);
227 lwgeom_free(geom2);
228 lwgeom_free(geom1);
229}
#define LW_PARSER_CHECK_ALL
Definition liblwgeom.h:2061
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1138
LWGEOM * lwgeom_clone(const LWGEOM *lwgeom)
Clone LWGEOM object.
Definition lwgeom.c:473
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition lwin_wkt.c:905

References LW_PARSER_CHECK_ALL, lwgeom_clone(), lwgeom_free(), and lwgeom_from_wkt().

Referenced by misc_suite_setup().

Here is the call graph for this function:
Here is the caller graph for this function: