Lines Matching defs:key
45 * slot matching the given key and hashcode. If one is found, it
132 * Constants for hinting whether a key or value is an integer
148 UHashTok key, UHashTok value, int8_t hint) {
151 if (hash->keyDeleter != nullptr && e->key.pointer != nullptr &&
152 e->key.pointer != key.pointer) { /* Avoid double deletion */
153 (*hash->keyDeleter)(e->key.pointer);
169 e->key.pointer = key.pointer;
171 e->key = key;
240 p->key = emptytok;
308 * Look for a key in the table, or if no such key exists, the first
327 * or deleted slots) and if no matching key is found. In practice, we
336 _uhash_find(const UHashtable *hash, UHashTok key,
351 if ((*hash->keyComparator)(key, elements[theIndex].key)) {
355 /* We have hit a slot which contains a key-value pair,
426 UHashElement *e = _uhash_find(hash, old[i].key, old[i].hashcode);
429 e->key = old[i].key;
441 UHashTok key) {
442 /* First find the position of the key in the table. If the object
450 UHashElement* e = _uhash_find(hash, key, hash->keyHasher(key));
466 UHashTok key,
472 * key is already in the table, it is deleted, if there is a
473 * non-nullptr keyDeleter. Then the key, the hash and the value are
488 * get() to indicate an absent key. Storing nullptr == removing.
490 return _uhash_remove(hash, key);
499 hashcode = (*hash->keyHasher)(key);
500 e = _uhash_find(hash, key, hashcode);
521 * old key, then it must be deleted (if the deleter != nullptr).
524 return _uhash_setElement(hash, e, hashcode & 0x7FFFFFFF, key, value, hint);
527 /* If the deleters are non-nullptr, this method adopts its key and/or
528 * value arguments, and we must be sure to delete the key and/or
531 HASH_DELETE_KEY_VALUE(hash, key.pointer, value.pointer);
602 HASH_DELETE_KEY_VALUE(hash, e->key.pointer, e->value.pointer);
663 const void* key) {
665 keyholder.pointer = (void*) key;
671 int32_t key) {
673 keyholder.integer = key;
679 const void* key) {
681 keyholder.pointer = (void*) key;
687 int32_t key) {
689 keyholder.integer = key;
695 const void *key,
698 keyholder.pointer = (void *)key;
706 int32_t key,
709 keyholder.integer = key;
717 void* key,
721 keyholder.pointer = key;
730 int32_t key,
734 keyholder.integer = key;
743 void* key,
747 keyholder.pointer = key;
757 int32_t key,
761 keyholder.integer = key;
770 void *key,
774 keyholder.pointer = key;
784 int32_t key,
788 keyholder.integer = key;
797 const void* key) {
799 keyholder.pointer = (void*) key;
805 int32_t key) {
807 keyholder.integer = key;
813 const void* key) {
815 keyholder.pointer = (void*) key;
821 int32_t key) {
823 keyholder.integer = key;
841 uhash_containsKey(const UHashtable *hash, const void *key) {
843 keyholder.pointer = (void *)key;
849 * Returns true if the UHashtable contains an item with this integer key.
852 * @param key An integer key stored in a hashtable
853 * @return true if the key is found.
856 uhash_icontainsKey(const UHashtable *hash, int32_t key) {
858 keyholder.integer = key;
864 uhash_find(const UHashtable *hash, const void* key) {
867 keyholder.pointer = (void*) key;
930 uhash_hashUChars(const UHashTok key) {
931 const char16_t *s = (const char16_t *)key.pointer;
936 uhash_hashChars(const UHashTok key) {
937 const char *s = (const char *)key.pointer;
942 uhash_hashIChars(const UHashTok key) {
943 const char *s = (const char *)key.pointer;
984 const UHashTok key1 = elem1->key;
986 /* here the keys are not compared, instead the key form hash1 is used to fetch
988 * contain equal values for the same key!
1059 uhash_hashLong(const UHashTok key) {
1060 return key.integer;