From 8a442ede823c0e92ebca81bb26a2bb1e44b2df3d Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Fri, 24 Aug 2007 14:40:14 +0000 Subject: [PATCH] make g_slice_copy() take a gconstpointer instead of a gpointer. 2007-08-24 Michael Natterer * glib/gslice.[ch]: make g_slice_copy() take a gconstpointer instead of a gpointer. svn path=/trunk/; revision=5720 --- ChangeLog | 5 +++++ glib/gslice.c | 4 ++-- glib/gslice.h | 18 +++++++++--------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2cde36..a86b922 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-08-24 Michael Natterer + + * glib/gslice.[ch]: make g_slice_copy() take a gconstpointer + instead of a gpointer. + 2007-08-22 Cody Russell * glib/gprintf.c: Document all printf functions to use diff --git a/glib/gslice.c b/glib/gslice.c index 66ed898..f10df34 100644 --- a/glib/gslice.c +++ b/glib/gslice.c @@ -837,8 +837,8 @@ g_slice_alloc0 (gsize mem_size) } gpointer -g_slice_copy (gsize mem_size, - gpointer mem_block) +g_slice_copy (gsize mem_size, + gconstpointer mem_block) { gpointer mem = g_slice_alloc (mem_size); if (mem) diff --git a/glib/gslice.h b/glib/gslice.h index 84a6e89..cd3b5aa 100644 --- a/glib/gslice.h +++ b/glib/gslice.h @@ -29,15 +29,15 @@ G_BEGIN_DECLS /* slices - fast allocation/release of small memory blocks */ -gpointer g_slice_alloc (gsize block_size) G_GNUC_MALLOC; -gpointer g_slice_alloc0 (gsize block_size) G_GNUC_MALLOC; -gpointer g_slice_copy (gsize block_size, - gpointer mem_block) G_GNUC_MALLOC; -void g_slice_free1 (gsize block_size, - gpointer mem_block); -void g_slice_free_chain_with_offset (gsize block_size, - gpointer mem_chain, - gsize next_offset); +gpointer g_slice_alloc (gsize block_size) G_GNUC_MALLOC; +gpointer g_slice_alloc0 (gsize block_size) G_GNUC_MALLOC; +gpointer g_slice_copy (gsize block_size, + gconstpointer mem_block) G_GNUC_MALLOC; +void g_slice_free1 (gsize block_size, + gpointer mem_block); +void g_slice_free_chain_with_offset (gsize block_size, + gpointer mem_chain, + gsize next_offset); #define g_slice_new(type) ((type*) g_slice_alloc (sizeof (type))) #define g_slice_new0(type) ((type*) g_slice_alloc0 (sizeof (type))) /* MemoryBlockType * -- 2.7.4