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:
parent
5b76b1585f
commit
79df89b30a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user