PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ add_key()

static uint32_t add_key ( mvt_agg_context ctx,
char *  name 
)
static

Definition at line 308 of file mvt.c.

309 {
310  struct mvt_kv_key *kv;
311  size_t size = strlen(name);
312  kv = palloc(sizeof(*kv));
313  kv->id = ctx->keys_hash_i++;
314  kv->name = name;
315  HASH_ADD_KEYPTR(hh, ctx->keys_hash, name, size, kv);
316  return kv->id;
317 }
uint32_t keys_hash_i
Definition: mvt.h:77
struct mvt_kv_key * keys_hash
Definition: mvt.h:69
uint32_t id
Definition: mvt.c:60
UT_hash_handle hh
Definition: mvt.c:61
char * name
Definition: mvt.c:59
Definition: mvt.c:58
#define HASH_ADD_KEYPTR(hh, head, keyptr, keylen_in, add)
Definition: uthash.h:329

References HASH_ADD_KEYPTR, mvt_kv_key::hh, mvt_kv_key::id, mvt_agg_context::keys_hash, mvt_agg_context::keys_hash_i, and mvt_kv_key::name.

Referenced by parse_column_keys(), and parse_jsonb().

Here is the caller graph for this function: