PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ ensure_items_len()

static void ensure_items_len ( struct flatgeobuf_agg_ctx ctx)
static

Definition at line 138 of file flatgeobuf.c.

139 {
140  if (ctx->ctx->features_count == 0) {
141  ctx->ctx->items_len = 32;
142  ctx->ctx->items = palloc(sizeof(flatgeobuf_item *) * ctx->ctx->items_len);
143  }
144  if (ctx->ctx->items_len < (ctx->ctx->features_count + 1)) {
145  ctx->ctx->items_len = ctx->ctx->items_len * 2;
146  POSTGIS_DEBUGF(2, "flatgeobuf: reallocating items to len %lld", ctx->ctx->items_len);
147  ctx->ctx->items = repalloc(ctx->ctx->items, sizeof(flatgeobuf_item *) * ctx->ctx->items_len);
148  ensure_items_len(ctx);
149  }
150 }
static void ensure_items_len(struct flatgeobuf_agg_ctx *ctx)
Definition: flatgeobuf.c:138
flatgeobuf_ctx * ctx
Definition: flatgeobuf.h:48

References flatgeobuf_agg_ctx::ctx.

Referenced by flatgeobuf_agg_transfn().

Here is the caller graph for this function: