summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-05-17 20:43:49 +0000
committerLennart Poettering <lennart@poettering.net>2006-05-17 20:43:49 +0000
commitee4d6b064fe9c872e008a37b5b8daf60752a27ae (patch)
treea14ac0f31eb73c4df2408307772c3559760b2ff5 /src
parentdc9151d35517d82769028c7dd81e0d7cc527a270 (diff)
add C++ macros to xmalloc.h
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@921 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src')
-rw-r--r--src/polyp/xmalloc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/polyp/xmalloc.h b/src/polyp/xmalloc.h
index 9d91d8dc..49b6d7bc 100644
--- a/src/polyp/xmalloc.h
+++ b/src/polyp/xmalloc.h
@@ -26,11 +26,14 @@
#include <stdlib.h>
#include <limits.h>
#include <assert.h>
+#include <polyp/cdecl.h>
/** \file
* Memory allocation functions.
*/
+PA_C_DECL_BEGIN
+
/** Allocate the specified number of bytes, just like malloc() does. However, in case of OOM, terminate */
void* pa_xmalloc(size_t l);
@@ -70,4 +73,6 @@ static inline void* pa_xnew0_internal(unsigned n, size_t k) {
/** Same as pa_xnew() but set the memory to zero */
#define pa_xnew0(type, n) ((type*) pa_xnew0_internal((n), sizeof(type)))
+PA_C_DECL_END
+
#endif