diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2009-01-08 11:39:27 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2009-01-08 11:39:27 +0000 |
commit | 79df89b30a92bb302e8d0202b376501bd01d0a02 (patch) | |
tree | 41f9226e8ac186c79cb1791e2c1316eac96cfd80 /src | |
parent | 5b76b1585f387a161625d4bed7a55218472ce5b2 (diff) | |
download | irssi-79df89b30a92bb302e8d0202b376501bd01d0a02.zip |
Add defines for memory slices functions for compatibility with glib
versions older than 2.10.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4977 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/common.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h index 3c4f2723..bb246962 100644 --- a/src/common.h +++ b/src/common.h @@ -43,6 +43,15 @@ # include <gmodule.h> #endif +#if !GLIB_CHECK_VERSION(2,10,0) +#define g_slice_alloc(size) g_malloc(size) +#define g_slice_alloc0(size) g_malloc0(size) +#define g_slice_free1(size, mem) g_free(mem) +#define g_slice_new(type) g_new(type, 1) +#define g_slice_new0(type) g_new0(type, 1) +#define g_slice_free(type, mem) g_free(mem) +#endif + #ifdef USE_GC # define g_free(x) G_STMT_START { (x) = NULL; } G_STMT_END #endif |