summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2010-05-08 17:13:49 +0200
committerJunio C Hamano <gitster@pobox.com>2010-05-08 22:27:54 -0700
commit851c34b04e0ce866e15c28e144986eca7533a6f4 (patch)
treef0c79c6963ecc08c4ab1d76a08156bcd2bfc39f5 /git-compat-util.h
parent937491944292fa3303b565b9bd8914c6b644ab13 (diff)
downloadgit-851c34b04e0ce866e15c28e144986eca7533a6f4.tar.gz
Have set_try_to_free_routine return the previous routine
This effectively requires from the callers of set_try_to_free_routine to treat the try-to-free-routines as a stack. We will need this for the next patch where the only current caller cannot depend on that the previously set routine was the default routine. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 1c171db8b1..828aadaf3a 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -346,7 +346,8 @@ static inline char *gitstrchrnul(const char *s, int c)
extern void release_pack_memory(size_t, int);
-extern void set_try_to_free_routine(void (*routine)(size_t));
+typedef void (*try_to_free_t)(size_t);
+extern try_to_free_t set_try_to_free_routine(try_to_free_t);
extern char *xstrdup(const char *str);
extern void *xmalloc(size_t size);