PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ gserialized_copy()

GSERIALIZED* gserialized_copy ( const GSERIALIZED g)

Return a copy of the input serialized geometry.

Definition at line 142 of file g_serialized.c.

143 {
144  GSERIALIZED *g_out = NULL;
145  assert(g);
146  g_out = (GSERIALIZED*)lwalloc(SIZE_GET(g->size));
147  memcpy((uint8_t*)g_out,(uint8_t*)g,SIZE_GET(g->size));
148  return g_out;
149 }
void * lwalloc(size_t size)
Definition: lwutil.c:229
#define SIZE_GET(varsize)
Macro for reading the size from the GSERIALIZED size attribute.
uint32_t size
Definition: liblwgeom.h:384
unsigned char uint8_t
Definition: uthash.h:79

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

Here is the call graph for this function: