Lines Matching refs:key
31 * arbitrary key-value mappings. It is used by libpool to store
73 * A key bucket.
77 const void *db_key; /* key */
83 * A dictionary which holds a mapping between a key and a value.
87 * dh_buckets - key storage
184 hash_addr(const void *key)
186 return (hash_buf(&key, sizeof (key)));
289 * Get a value from the hash. Null is returned if the key cannot be
293 dict_get(dict_hdl_t *hdl, const void *key)
298 i = (*hdl->dh_hash)(key)%hdl->dh_size;
301 if ((*hdl->dh_cmp)(key, bucket->db_key) == 0)
307 * Put an entry into the hash. Null is returned if this key was not
311 dict_put(dict_hdl_t *hdl, const void *key, void *value)
317 i = (*hdl->dh_hash)(key)%hdl->dh_size;
320 if ((*hdl->dh_cmp)(key, bucket->db_key) == 0)
326 bucket->db_key = key;
337 * Remove the key/value from the dictionary. The value is returned if
338 * the key is found. NULL is returned if the key cannot be located.
341 dict_remove(dict_hdl_t *hdl, const void *key)
347 i = (*hdl->dh_hash)(key)%hdl->dh_size;
351 if ((*hdl->dh_cmp)(key, (*pbucket)->db_key) == 0) {
366 * (apply) with the key, value and user supplied data. If the