| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) |
| 24 |
#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents." |
| 25 |
#endif |
| 26 |
|
| 27 |
#ifndef DBUS_MEMORY_H |
| 28 |
#define DBUS_MEMORY_H |
| 29 |
|
| 30 |
#include <dbus/dbus-macros.h> |
| 31 |
#include <stddef.h> |
| 32 |
|
| 33 |
DBUS_BEGIN_DECLS |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
DBUS_EXPORT |
| 41 |
DBUS_MALLOC |
| 42 |
DBUS_ALLOC_SIZE(1) |
| 43 |
void* dbus_malloc (size_t bytes); |
| 44 |
|
| 45 |
DBUS_EXPORT |
| 46 |
DBUS_MALLOC |
| 47 |
DBUS_ALLOC_SIZE(1) |
| 48 |
void* dbus_malloc0 (size_t bytes); |
| 49 |
|
| 50 |
DBUS_EXPORT |
| 51 |
DBUS_MALLOC |
| 52 |
DBUS_ALLOC_SIZE(2) |
| 53 |
void* dbus_realloc (void *memory, |
| 54 |
size_t bytes); |
| 55 |
DBUS_EXPORT |
| 56 |
void dbus_free (void *memory); |
| 57 |
|
| 58 |
#define dbus_new(type, count) ((type*)dbus_malloc (sizeof (type) * (count))) |
| 59 |
#define dbus_new0(type, count) ((type*)dbus_malloc0 (sizeof (type) * (count))) |
| 60 |
|
| 61 |
DBUS_EXPORT |
| 62 |
void dbus_free_string_array (char **str_array); |
| 63 |
|
| 64 |
typedef void (* DBusFreeFunction) (void *memory); |
| 65 |
|
| 66 |
DBUS_EXPORT |
| 67 |
void dbus_shutdown (void); |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
DBUS_END_DECLS |
| 72 |
|
| 73 |
#endif |