PostGIS  3.4.0dev-r@@SVN_REVISION@@
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages

◆ stringlist_add_string_internal()

static void stringlist_add_string_internal ( stringlist_t s,
const char *  string,
int  dosort 
)
static

Definition at line 92 of file stringlist.c.

93 {
94  if (!string) return;
95  if (s->capacity == 0)
96  {
98  }
99  if (s->length == s->capacity)
100  {
101  s->capacity *= 2;
102  s->data = lwrealloc(s->data, stringlist_capacity_in_bytes(s->capacity));
103  };
104  s->data[s->length++] = lwstrdup(string);
105  if (dosort)
107  return;
108 }
char * s
Definition: cu_in_wkt.c:23
void * lwrealloc(void *mem, size_t size)
Definition: lwutil.c:235
char * lwstrdup(const char *a)
Definition: lwutil.c:248
void stringlist_init(stringlist_t *s)
Definition: stringlist.c:44
static size_t stringlist_capacity_in_bytes(size_t capacity)
Definition: stringlist.c:29
void stringlist_sort(stringlist_t *s)
Definition: stringlist.c:123

References lwrealloc(), lwstrdup(), s, stringlist_capacity_in_bytes(), stringlist_init(), and stringlist_sort().

Referenced by stringlist_add_string(), and stringlist_add_string_nosort().

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