Home | History | Annotate | Download | only in libcutils

Lines Matching refs:entry

26 typedef struct Entry Entry;
27 struct Entry {
31 Entry* next;
35 Entry** buckets;
61 map->buckets = calloc(map->bucketCount, sizeof(Entry*));
106 Entry** newBuckets = calloc(newBucketCount, sizeof(Entry*));
115 Entry* entry = map->buckets[i];
116 while (entry != NULL) {
117 Entry* next = entry->next;
118 size_t index = calculateIndex(newBucketCount, entry->hash);
119 entry->next = newBuckets[index];
120 newBuckets[index] = entry;
121 entry = next;
143 Entry* entry = map->buckets[i];
144 while (entry != NULL) {
145 Entry* next = entry->next;
146 free(entry);
147 entry = next;
166 static Entry* createEntry(void* key, int hash, void* value) {
167 Entry* entry = malloc(sizeof(Entry));
168 if (entry == NULL) {
171 entry->key = key;
172 entry->hash = hash;
173 entry->value = value;
174 entry->next = NULL;
175 return entry;
193 Entry** p = &(map->buckets[index]);
195 Entry* current = *p;
197 // Add a new entry.
209 // Replace existing entry.
216 // Move to next entry.
225 Entry* entry = map->buckets[index];
226 while (entry != NULL) {
227 if (equalKeys(entry->key, entry->hash, key, hash, map->equals)) {
228 return entry->value;
230 entry = entry->next;
240 Entry* entry = map->buckets[index];
241 while (entry != NULL) {
242 if (equalKeys(entry->key, entry->hash, key, hash, map->equals)) {
245 entry = entry->next;
256 Entry** p = &(map->buckets[index]);
258 Entry* current = *p;
260 // Add a new entry.
279 // Move to next entry.
288 // Pointer to the current entry.
289 Entry** p = &(map->buckets[index]);
290 Entry* current;
311 Entry* entry = map->buckets[i];
312 while (entry != NULL) {
313 Entry *next = entry->next;
314 if (!callback(entry->key, entry->value, context)) {
317 entry = next;
331 Entry* entry = map->buckets[i];
332 while (entry != NULL) {
333 if (entry->next != NULL) {
336 entry = entry->next;