PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ stringbuffer_getvarlenacopy()

lwvarlena_t* stringbuffer_getvarlenacopy ( stringbuffer_t s)

Definition at line 151 of file stringbuffer.c.

152 {
153  size_t size = (s->str_end - s->str_start);
154  lwvarlena_t *output = (lwvarlena_t *)lwalloc(size + LWVARHDRSZ);
155  LWSIZE_SET(output->size, size + LWVARHDRSZ);
156 
157  memcpy(output->data, s->str_start, size);
158  return output;
159 }
char * s
Definition: cu_in_wkt.c:23
#define LWVARHDRSZ
Definition: liblwgeom.h:311
#define LWSIZE_SET(varsize, len)
Definition: liblwgeom.h:325
void * lwalloc(size_t size)
Definition: lwutil.c:227
uint32_t size
Definition: liblwgeom.h:307
char data[]
Definition: liblwgeom.h:308

References lwvarlena_t::data, lwalloc(), LWSIZE_SET, LWVARHDRSZ, s, and lwvarlena_t::size.

Referenced by lwgeom_to_kml2(), lwgeom_to_marc21(), lwgeom_to_wkt_varlena(), lwgeom_to_x3d3(), and pointarray_to_encoded_polyline().

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