* their .gitmodules blob sha1 and submodule name.
*/
hashmap_for_each_entry(&cache->for_name, &iter, entry,
- struct submodule_entry, ent /* member name */)
+ ent /* member name */)
free_one_config(entry);
- hashmap_free(&cache->for_path, 1);
- hashmap_free(&cache->for_name, 1);
+ hashmap_free_entries(&cache->for_path, struct submodule_entry, ent);
+ hashmap_free_entries(&cache->for_name, struct submodule_entry, ent);
cache->initialized = 0;
cache->gitmodules_read = 0;
}
struct submodule_entry *removed;
hashmap_entry_init(&e.ent, hash);
e.config = submodule;
- removed = hashmap_remove_entry(&cache->for_path, &e, NULL,
- struct submodule_entry,
- ent /* member name */);
+ removed = hashmap_remove_entry(&cache->for_path, &e, ent, NULL);
free(removed);
}
hashmap_entry_init(&key.ent, hash);
key.config = &key_config;
- entry = hashmap_get_entry(&cache->for_path, &key, NULL,
- struct submodule_entry, ent);
+ entry = hashmap_get_entry(&cache->for_path, &key, ent, NULL);
if (entry)
return entry->config;
return NULL;
hashmap_entry_init(&key.ent, hash);
key.config = &key_config;
- entry = hashmap_get_entry(&cache->for_name, &key, NULL,
- struct submodule_entry, ent);
+ entry = hashmap_get_entry(&cache->for_name, &key, ent, NULL);
if (entry)
return entry->config;
return NULL;