PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ query_accumulate()

static void query_accumulate ( void *  item,
void *  userdata 
)
static

Definition at line 140 of file lwgeom_geos_cluster.c.

141 {
142  struct QueryContext *cxt = userdata;
143  if (!cxt->items_found)
144  {
145  cxt->items_found_size = 8;
146  cxt->items_found = lwalloc(cxt->items_found_size * sizeof(void*));
147  }
148 
149  if (cxt->num_items_found >= cxt->items_found_size)
150  {
151  cxt->items_found_size = 2 * cxt->items_found_size;
152  cxt->items_found = lwrealloc(cxt->items_found, cxt->items_found_size * sizeof(void*));
153  }
154  cxt->items_found[cxt->num_items_found++] = item;
155 }
void * lwrealloc(void *mem, size_t size)
Definition: lwutil.c:237
void * lwalloc(size_t size)
Definition: lwutil.c:229
uint32_t num_items_found
uint32_t items_found_size

References QueryContext::items_found, QueryContext::items_found_size, lwalloc(), lwrealloc(), and QueryContext::num_items_found.

Referenced by dbscan_update_context(), and union_intersecting_pairs().

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