From 11f944dd6bdabd003325c85dc60b16389d012361 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 18 Feb 2011 19:55:19 -0800 Subject: for_each_hash: allow passing a 'void *data' pointer to callback For the find_exact_renames() function, this allows us to pass the diff_options structure pointer to the low-level routines. We will use that to distinguish between the "rename" and "copy" cases. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- hash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hash.h') diff --git a/hash.h b/hash.h index 69e33a47b9..b875ce67c4 100644 --- a/hash.h +++ b/hash.h @@ -30,7 +30,7 @@ struct hash_table { extern void *lookup_hash(unsigned int hash, const struct hash_table *table); extern void **insert_hash(unsigned int hash, void *ptr, struct hash_table *table); -extern int for_each_hash(const struct hash_table *table, int (*fn)(void *)); +extern int for_each_hash(const struct hash_table *table, int (*fn)(void *, void *), void *data); extern void free_hash(struct hash_table *table); static inline void init_hash(struct hash_table *table) -- cgit v1.2.3