Lines Matching +defs:hash +defs:table

76 FcHashTableDestroy (FcHashTable *table)
82 FcHashBucket *bucket = table->buckets[i], *prev;
86 if (table->key_destroy_func)
87 table->key_destroy_func (bucket->key);
88 if (table->value_destroy_func)
89 table->value_destroy_func (bucket->value);
94 table->buckets[i] = NULL;
96 free (table);
100 FcHashTableFind (FcHashTable *table,
105 FcChar32 hash = table->hash_func (key);
107 for (bucket = table->buckets[hash % FC_HASH_SIZE]; bucket; bucket = bucket->next)
109 if (!table->compare_func(bucket->key, key))
111 if (table->value_copy_func)
113 if (!table->value_copy_func (bucket->value, value))
125 FcHashTableAddInternal (FcHashTable *table,
131 FcChar32 hash = table->hash_func (key);
138 if (table->key_copy_func)
139 ret |= !table->key_copy_func (key, &bucket->key);
142 if (table->value_copy_func)
143 ret |= !table->value_copy_func (value, &bucket->value);
149 if (bucket->key && table->key_destroy_func)
150 table->key_destroy_func (bucket->key);
151 if (bucket->value && table->value_destroy_func)
152 table->value_destroy_func (bucket->value);
158 for (prev = &table->buckets[hash % FC_HASH_SIZE];
161 if (!table->compare_func (b->key, key))
183 FcHashTableAdd (FcHashTable *table,
187 return FcHashTableAddInternal (table, key, value, FcFalse);
191 FcHashTableReplace (FcHashTable *table,
195 return FcHashTableAddInternal (table, key, value, FcTrue);
199 FcHashTableRemove (FcHashTable *table,
203 FcChar32 hash = table->hash_func (key);
207 for (prev = &table->buckets[hash % FC_HASH_SIZE];
210 if (!table->compare_func (bucket->key, key))
214 if (table->key_destroy_func)
215 table->key_destroy_func (bucket->key);
216 if (table->value_destroy_func)
217 table->value_destroy_func (bucket->value);