PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ get_key_index()

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

Definition at line 283 of file mvt.c.

References HASH_FIND, mvt_kv_key::hh, mvt_kv_key::id, and mvt_agg_context::keys_hash.

Referenced by parse_jsonb(), and parse_values().

284 {
285  struct mvt_kv_key *kv;
286  size_t size = strlen(name);
287  HASH_FIND(hh, ctx->keys_hash, name, size, kv);
288  if (!kv)
289  return -1;
290  return kv->id;
291 }
uint32_t id
Definition: mvt.c:56
#define HASH_FIND(hh, head, keyptr, keylen, out)
Definition: uthash.h:132
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: