diff options
author | Maria Matejka <mq@ucw.cz> | 2019-07-02 10:45:53 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2019-07-02 10:45:53 +0200 |
commit | b40c0f028f37086991fefa9197708ba8c7b3d571 (patch) | |
tree | 91721f9ab6b49c86c43e2c83e6acd628ae0c0bae /lib/resource.h | |
parent | 30667d50417f926fc948905aaab3e679b416b2e1 (diff) |
Filter: Pre-evaluation of constant expressions
Diffstat (limited to 'lib/resource.h')
-rw-r--r-- | lib/resource.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/resource.h b/lib/resource.h index d9d4bb8f..ad17d9ed 100644 --- a/lib/resource.h +++ b/lib/resource.h @@ -101,9 +101,13 @@ void buffer_realloc(void **buf, unsigned *size, unsigned need, unsigned item_siz */ #define DMALLOC_DISABLE #include <dmalloc.h> -#define xmalloc(size) _xmalloc_leap(__FILE__, __LINE__, size) -#define xrealloc(size) _xrealloc_leap(__FILE__, __LINE__, size) -#define xfree(ptr) _xfree_leap(__FILE__, __LINE__, ptr) +#define xmalloc(size) \ + dmalloc_malloc(__FILE__, __LINE__, (size), DMALLOC_FUNC_MALLOC, 0, 1) +#define xrealloc(ptr, size) \ + dmalloc_realloc(__FILE__, __LINE__, (ptr), (size), DMALLOC_FUNC_REALLOC, 1) +#define xfree(ptr) \ + dmalloc_free(__FILE__, __LINE__, (ptr), DMALLOC_FUNC_FREE) + #else /* * Unfortunately, several libraries we might want to link to define |