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

◆ stringbuffer_getvarlenacopy()

lwvarlena_t * stringbuffer_getvarlenacopy ( stringbuffer_t s)

Definition at line 154 of file stringbuffer.c.

155{
156 size_t size = (s->str_end - s->str_start);
157 lwvarlena_t *output = (lwvarlena_t *)lwalloc(size + LWVARHDRSZ);
158 LWSIZE_SET(output->size, size + LWVARHDRSZ);
159
160 memcpy(output->data, s->str_start, size);
161 return output;
162}
char * s
Definition cu_in_wkt.c:23
#define LWVARHDRSZ
Definition liblwgeom.h:311
void * lwalloc(size_t size)
Definition lwutil.c:227
#define LWSIZE_SET(varsize, len)
Definition liblwgeom.h:325
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: