alloc: add repository argument to alloc_blob_node
This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. Use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
c077a4526b
commit
f0de1d62ae
2
alloc.c
2
alloc.c
@@ -49,7 +49,7 @@ static inline void *alloc_node(struct alloc_state *s, size_t node_size)
|
||||
}
|
||||
|
||||
static struct alloc_state blob_state;
|
||||
void *alloc_blob_node(void)
|
||||
void *alloc_blob_node_the_repository(void)
|
||||
{
|
||||
struct blob *b = alloc_node(&blob_state, sizeof(struct blob));
|
||||
b->object.type = OBJ_BLOB;
|
||||
|
||||
Reference in New Issue
Block a user