Skip to content

Commit 17bfe87

Browse files
stefanbellergitster
authored andcommitted
alloc: add repository argument to alloc_report
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 13e3fdc commit 17bfe87

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static void report(const char *name, unsigned int count, size_t size)
105105
#define REPORT(name, type) \
106106
report(#name, name##_state.count, name##_state.count * sizeof(type) >> 10)
107107

108-
void alloc_report(void)
108+
void alloc_report_the_repository(void)
109109
{
110110
REPORT(blob, struct blob);
111111
REPORT(tree, struct tree);

cache.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,8 @@ extern void *alloc_commit_node_the_repository(void);
17741774
extern void *alloc_tag_node_the_repository(void);
17751775
#define alloc_object_node(r) alloc_object_node_##r()
17761776
extern void *alloc_object_node_the_repository(void);
1777-
extern void alloc_report(void);
1777+
#define alloc_report(r) alloc_report_##r()
1778+
extern void alloc_report_the_repository(void);
17781779
extern unsigned int alloc_commit_index(void);
17791780

17801781
/* pkt-line.c */

0 commit comments

Comments
 (0)