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

◆ stringbuffer_getstringcopy()

char * stringbuffer_getstringcopy ( stringbuffer_t s)

Returns a newly allocated string large enough to contain the current state of the string.

Caller is responsible for freeing the return value.

Definition at line 136 of file stringbuffer.c.

137{
138 size_t size = (s->str_end - s->str_start) + 1;
139 char *str = lwalloc(size);
140 memcpy(str, s->str_start, size);
141 str[size - 1] = '\0';
142 return str;
143}
char * s
Definition cu_in_wkt.c:23
void * lwalloc(size_t size)
Definition lwutil.c:227
#define str(s)

References lwalloc(), s, and str.

Referenced by lwgeom_to_wkt(), nd_box_to_json(), nd_stats_to_grid(), nd_stats_to_json(), and ShpDumperOpenTable().

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