From 671f0707212c929533dc6ec9e032faee328e4602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Mon, 14 Jul 2008 21:22:12 +0200 Subject: add context pointer to read_tree_recursive() Add a pointer parameter to read_tree_recursive(), which is passed to the callback function. This allows callers of read_tree_recursive() to share data with the callback without resorting to global variables. All current callers pass NULL. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- tree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tree.h') diff --git a/tree.h b/tree.h index dd25c539ef..2ff01a4f83 100644 --- a/tree.h +++ b/tree.h @@ -21,12 +21,12 @@ int parse_tree(struct tree *tree); struct tree *parse_tree_indirect(const unsigned char *sha1); #define READ_TREE_RECURSIVE 1 -typedef int (*read_tree_fn_t)(const unsigned char *, const char *, int, const char *, unsigned int, int); +typedef int (*read_tree_fn_t)(const unsigned char *, const char *, int, const char *, unsigned int, int, void *); extern int read_tree_recursive(struct tree *tree, const char *base, int baselen, int stage, const char **match, - read_tree_fn_t fn); + read_tree_fn_t fn, void *context); extern int read_tree(struct tree *tree, int stage, const char **paths); -- cgit v1.2.3