PostGIS  2.2.7dev-r@@SVN_REVISION@@
stringbuffer_t* stringbuffer_create_with_size ( size_t  size)

Allocate a new stringbuffer_t.

Use stringbuffer_destroy to free.

Definition at line 55 of file stringbuffer.c.

References stringbuffer_t::capacity, lwalloc(), s, stringbuffer_t::str_end, and stringbuffer_t::str_start.

Referenced by stringbuffer_create(), test_stringbuffer_append(), and test_stringbuffer_aprintf().

56 {
58 
59  s = lwalloc(sizeof(stringbuffer_t));
60  s->str_start = lwalloc(size);
61  s->str_end = s->str_start;
62  s->capacity = size;
63  memset(s->str_start,0,size);
64  return s;
65 }
char * str_start
Definition: stringbuffer.h:52
char * s
Definition: cu_in_wkt.c:23
void * lwalloc(size_t size)
Definition: lwutil.c:199

Here is the call graph for this function:

Here is the caller graph for this function: