From 79df89b30a92bb302e8d0202b376501bd01d0a02 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Thu, 8 Jan 2009 11:39:27 +0000 Subject: [PATCH] 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 --- src/common.h | 9 +++++++++ 1 file changed, 9 insertions(+) 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 #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