Mercurial > projects > dbus-d
comparison dbus-d/dsrc/org/freedesktop/dbus/c/Memory.d @ 0:a5576806d36d
recreate repository without any libs for lightweight repository
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 20 Oct 2007 18:07:18 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a5576806d36d |
---|---|
1 /* -*- mode: C; c-file-style: "gnu" -*- */ | |
2 /* dbus-memory.h D-Bus memory handling | |
3 * | |
4 * Copyright (C) 2002 Red Hat Inc. | |
5 * | |
6 * Licensed under the Academic Free License version 2.1 | |
7 * | |
8 * This program is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program; if not, write to the Free Software | |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 * | |
22 */ | |
23 module org.freedesktop.dbus.c.Memory; | |
24 | |
25 extern(C): | |
26 /** | |
27 * @addtogroup DBusMemory | |
28 * @{ | |
29 */ | |
30 | |
31 void* dbus_malloc (size_t bytes); | |
32 void* dbus_malloc0 (size_t bytes); | |
33 void* dbus_realloc (void *memory, | |
34 size_t bytes); | |
35 void dbus_free (void *memory); | |
36 | |
37 T* dbus_new(T)( count){ | |
38 return cast(T*)dbus_malloc (T.sizeof * count); | |
39 } | |
40 | |
41 T* dbus_new0(T)( count){ | |
42 return cast(T*)dbus_malloc0 (T.sizeof* count); | |
43 } | |
44 | |
45 void dbus_free_string_array (char **str_array); | |
46 | |
47 alias void (* DBusFreeFunction) (void *memory); | |
48 | |
49 void dbus_shutdown (); | |
50 | |
51 /** @} */ | |
52 |