PostGIS  2.1.10dev-r@@SVN_REVISION@@
GSERIALIZED* gserialized_copy ( const GSERIALIZED g)

Return a copy of the input serialized geometry.

Definition at line 103 of file g_serialized.c.

References lwalloc(), GSERIALIZED::size, and SIZE_GET.

104 {
105  GSERIALIZED *g_out = NULL;
106  assert(g);
107  g_out = (GSERIALIZED*)lwalloc(SIZE_GET(g->size));
108  memcpy((uint8_t*)g_out,(uint8_t*)g,SIZE_GET(g->size));
109  return g_out;
110 }
#define SIZE_GET(varsize)
Macro for reading the size from the GSERIALIZED size attribute.
uint32_t size
Definition: liblwgeom.h:337
void * lwalloc(size_t size)
Definition: lwutil.c:175

Here is the call graph for this function: