~ubuntu-branches/ubuntu/utopic/pcmanfm/utopic

« back to all changes in this revision

Viewing changes to src/compat/glib-mem.h

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Lee
  • Date: 2006-10-16 16:47:04 UTC
  • Revision ID: james.westby@ubuntu.com-20061016164704-w8zobnrvdxc7rvm5
Tags: upstream-0.3.2.1
ImportĀ upstreamĀ versionĀ 0.3.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* C++ Interface: glib-mem
 
3
*
 
4
* Description: Compatibility macros for older versions of glib
 
5
*
 
6
*
 
7
* Author: Hong Jen Yee (PCMan) <pcman.tw (AT) gmail.com>, (C) 2006
 
8
*
 
9
* Copyright: See COPYING file that comes with this distribution
 
10
*
 
11
*/
 
12
 
 
13
#ifndef _GLIB_MEM_H_
 
14
#define _GLIB_MEM_H_
 
15
 
 
16
#include <glib.h>
 
17
 
 
18
#if ! GLIB_CHECK_VERSION(2, 10, 0)
 
19
/* older versions of glib don't provde g_slice API */
 
20
#define g_slice_alloc(size)         g_malloc(size)
 
21
#define g_slice_alloc0(size)        g_malloc0(size)
 
22
#define g_slice_new(type)           g_new(type, 1)
 
23
#define g_slice_new0(type)          g_new0(type, 1)
 
24
#define g_slice_free(type, mem)     g_free(mem)
 
25
#define g_slice_free1(size, mem)    g_free(mem)
 
26
#endif
 
27
 
 
28
#endif
 
29