PostGIS  2.1.10dev-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 56 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().

57 {
59 
60  s = lwalloc(sizeof(stringbuffer_t));
61  s->str_start = lwalloc(size);
62  s->str_end = s->str_start;
63  s->capacity = size;
64  memset(s->str_start,0,size);
65  return s;
66 }
char * str_start
Definition: stringbuffer.h:53
char * s
Definition: cu_in_wkt.c:24
void * lwalloc(size_t size)
Definition: lwutil.c:175

Here is the call graph for this function:

Here is the caller graph for this function: