Mercurial > hg > th-libs
changeset 197:88986d0b56ef
Rename th_free_r() to th_free_r_real() and #define a macro wrapper for
casting argument to (void **).
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 11 Feb 2016 20:26:47 +0200 |
parents | 5c7de25666e7 |
children | 5a31e1f766be |
files | th_util.c th_util.h |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/th_util.c Thu Feb 11 17:52:35 2016 +0200 +++ b/th_util.c Thu Feb 11 20:26:47 2016 +0200 @@ -233,7 +233,7 @@ } -void th_free_r(void **ptr) +void th_free_r_real(void **ptr) { if (ptr != NULL) {
--- a/th_util.h Thu Feb 11 17:52:35 2016 +0200 +++ b/th_util.h Thu Feb 11 20:26:47 2016 +0200 @@ -149,7 +149,9 @@ void *th_calloc(size_t, size_t); void *th_realloc(void *ptr, size_t); void th_free(void *ptr); -void th_free_r(void **ptr); +void th_free_r_real(void **ptr); + +#define th_free_r(ptr) th_free_r_real((void **) ptr) /* Doubly linked list handling