add C++ macros to xmalloc.h
authorLennart Poettering <lennart@poettering.net>
Wed, 17 May 2006 20:43:49 +0000 (20:43 +0000)
committerLennart Poettering <lennart@poettering.net>
Wed, 17 May 2006 20:43:49 +0000 (20:43 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@921 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/polyp/xmalloc.h

index 9d91d8d..49b6d7b 100644 (file)
 #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