From 0becd69e9145186521e5e67ee34f12ba415b826c Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 19 May 2019 03:55:14 +0000 Subject: [PATCH] Tweak EDUKE32_PRE_XALLOC thing used when DEBUGGINGAIDS is defined git-svn-id: https://svn.eduke32.com/eduke32@7661 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/include/compat.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/source/build/include/compat.h b/source/build/include/compat.h index cb9e02b9c..358318370 100644 --- a/source/build/include/compat.h +++ b/source/build/include/compat.h @@ -1307,20 +1307,17 @@ static FORCE_INLINE void *xaligned_alloc(const bsize_t alignment, const bsize_t #endif #ifdef DEBUGGINGAIDS -# define EDUKE32_PRE_XALLLOC xalloc_set_location(__LINE__, __FILE__, EDUKE32_FUNCTION) -# define Xstrdup(s) (EDUKE32_PRE_XALLLOC, xstrdup(s)) -# define Xmalloc(size) (EDUKE32_PRE_XALLLOC, xmalloc(size)) -# define Xcalloc(nmemb, size) (EDUKE32_PRE_XALLLOC, xcalloc(nmemb, size)) -# define Xrealloc(ptr, size) (EDUKE32_PRE_XALLLOC, xrealloc(ptr, size)) -# define Xaligned_alloc(alignment, size) (EDUKE32_PRE_XALLLOC, xaligned_alloc(alignment, size)) +# define EDUKE32_PRE_XALLOC xalloc_set_location(__LINE__, __FILE__, EDUKE32_FUNCTION), #else -# define Xstrdup xstrdup -# define Xmalloc xmalloc -# define Xcalloc xcalloc -# define Xrealloc xrealloc -# define Xaligned_alloc xaligned_alloc +# define EDUKE32_PRE_XALLOC #endif +#define Xstrdup(s) (EDUKE32_PRE_XALLOC xstrdup(s)) +#define Xmalloc(size) (EDUKE32_PRE_XALLOC xmalloc(size)) +#define Xcalloc(nmemb, size) (EDUKE32_PRE_XALLOC xcalloc(nmemb, size)) +#define Xrealloc(ptr, size) (EDUKE32_PRE_XALLOC xrealloc(ptr, size)) +#define Xaligned_alloc(alignment, size) (EDUKE32_PRE_XALLOC xaligned_alloc(alignment, size)) + #ifdef __cplusplus } #endif