diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-13 11:21:21 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-13 11:21:21 -0700 |
commit | 44e08b003d37440fba6589c07a9573df9d28e6f5 (patch) | |
tree | f663e002f1183cf7330b5f34e16b44096ebeb72f /wrapper.c | |
parent | 57af58e888165db623925f25e290f1b9472fd5c9 (diff) | |
parent | 3a0942598ce33b195bfaaf250b2da23e4eceb3c6 (diff) | |
download | git-44e08b003d37440fba6589c07a9573df9d28e6f5.tar.gz |
Merge branch 'js/try-to-free-stackable'
* js/try-to-free-stackable:
Do not call release_pack_memory in malloc wrappers when GIT_TRACE is used
Have set_try_to_free_routine return the previous routine
Diffstat (limited to 'wrapper.c')
-rw-r--r-- | wrapper.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -10,9 +10,11 @@ static void try_to_free_builtin(size_t size) static void (*try_to_free_routine)(size_t size) = try_to_free_builtin; -void set_try_to_free_routine(void (*routine)(size_t)) +try_to_free_t set_try_to_free_routine(try_to_free_t routine) { - try_to_free_routine = (routine) ? routine : try_to_free_builtin; + try_to_free_t old = try_to_free_routine; + try_to_free_routine = routine; + return old; } char *xstrdup(const char *str) |