1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

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
This commit is contained in:
Emanuele Giaquinta 2009-01-08 11:39:27 +00:00 committed by exg
parent 5b76b1585f
commit 79df89b30a

View File

@ -43,6 +43,15 @@
# include <gmodule.h> # include <gmodule.h>
#endif #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 #ifdef USE_GC
# define g_free(x) G_STMT_START { (x) = NULL; } G_STMT_END # define g_free(x) G_STMT_START { (x) = NULL; } G_STMT_END
#endif #endif