diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-05-12 23:38:38 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-05-12 23:38:38 +0000 |
commit | a64e85acf96bc0c55363fe55c9e9116aef2a8584 (patch) | |
tree | 69ec57b46bdebe0e7496bf11ea9a54cdf5806904 /malloc.h | |
parent | 2eb6dec8e9f0114bdbad59cf8f11f197f8fdaaf3 (diff) |
resampling works
git-svn-id: file:///home/lennart/svn/public/libsydney/trunk@4 9ba3c220-e4d3-45a2-8aa3-73fcc9aff6ce
Diffstat (limited to 'malloc.h')
-rw-r--r-- | malloc.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -8,9 +8,12 @@ #define sa_free free #define sa_malloc0(size) calloc(1, (size)) #define sa_strdup strdup +#define sa_strndup strndup void* sa_memdup(const void* p, size_t size); -#define sa_new(t, n) ((t*) sa_malloc(sizeof(t)*n)) +#define sa_new(t, n) ((t*) sa_malloc(sizeof(t)*(n))) +#define sa_new0(t, n) ((t*) sa_malloc0(sizeof(t)*(n))) +#define sa_newdup(p, t, n) ((t*) sa_memdup(p, sizeof(t)*(n))) #endif |