mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
add C++ macros to xmalloc.h
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@921 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
dc9151d355
commit
ee4d6b064f
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue