Adding upstream version 0.3.5.2+svn20080509.
[debian/lxpanel.git] / src / glib-mem.h
1 /*
2 * C++ Interface: glib-mem
3 *
4 * Description: Compatibility macros for older versions of glib
5 *
6 * Author: Hong Jen Yee (PCMan) <pcman.tw (AT) gmail.com>, (C) 2006
7 *
8 * Copyright (c) 2006 LxDE Developers, see the file AUTHORS for details.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 */
24
25 #ifndef _GLIB_MEM_H_
26 #define _GLIB_MEM_H_
27
28 #include <glib.h>
29
30 #if ! GLIB_CHECK_VERSION(2, 10, 0)
31 /* older versions of glib don't provde g_slice API */
32 #define g_slice_alloc(size) g_malloc(size)
33 #define g_slice_alloc0(size) g_malloc0(size)
34 #define g_slice_new(type) g_new(type, 1)
35 #define g_slice_new0(type) g_new0(type, 1)
36 #define g_slice_free(type, mem) g_free(mem)
37 #define g_slice_free1(size, mem) g_free(mem)
38 #endif
39
40 #endif
41