if (is_null_oid(real))
return -1;
- if (!odb_source_read_object_info(&odb->inmemory_objects->base, oid, oi, flags))
+ if (!odb_source_read_object_info(odb->inmemory_objects, oid, oi, flags))
return 0;
odb_prepare_alternates(odb);
if (odb_has_object(odb, oid, 0))
return 0;
- return odb_source_write_object(&odb->inmemory_objects->base,
+ return odb_source_write_object(odb->inmemory_objects,
buf, len, type, oid, NULL, 0);
}
o->sources = odb_source_new(o, primary_source, true);
o->sources_tail = &o->sources->next;
o->alternate_db = xstrdup_or_null(secondary_sources);
- o->inmemory_objects = odb_source_inmemory_new(o);
+ o->inmemory_objects = &odb_source_inmemory_new(o)->base;
free(to_free);
o->sources = next;
}
- odb_source_free(&o->inmemory_objects->base);
+ odb_source_free(o->inmemory_objects);
o->inmemory_objects = NULL;
kh_destroy_odb_path_map(o->source_by_path);
* to write them into the object store (e.g. a browse-only
* application).
*/
- struct odb_source_inmemory *inmemory_objects;
+ struct odb_source *inmemory_objects;
/*
* A fast, rough count of the number of objects in the repository.