PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ add_key()

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

Definition at line 293 of file mvt.c.

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().

294 {
295  struct mvt_kv_key *kv;
296  size_t size = strlen(name);
297  kv = palloc(sizeof(*kv));
298  kv->id = ctx->keys_hash_i++;
299  kv->name = name;
300  HASH_ADD_KEYPTR(hh, ctx->keys_hash, name, size, kv);
301  return kv->id;
302 }
#define HASH_ADD_KEYPTR(hh, head, keyptr, keylen_in, add)
Definition: uthash.h:329
uint32_t id
Definition: mvt.c:56
uint32_t keys_hash_i
Definition: mvt.h:66
Definition: mvt.c:54
struct mvt_kv_key * keys_hash
Definition: mvt.h:58
UT_hash_handle hh
Definition: mvt.c:57
char * name
Definition: mvt.c:55
Here is the caller graph for this function: