Bug 519137 – g_slice_dup macro needs cast for 64-bit platform

* glib/gslice.h (g_slice_copy): Apply type casts needed
  for proper compilation on 64-bit platforms.

svn path=/trunk/; revision=6848
This commit is contained in:
Mathias Hasselmann 2008-04-10 21:40:48 +00:00
parent 0c153b46e2
commit 74487a8805
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2008-04-10 Mathias Hasselmann <mathias@openismus.com>
Bug 519137 g_slice_dup macro needs cast for 64-bit platform
* glib/gslice.h (g_slice_copy): Apply type casts needed
for proper compilation on 64-bit platforms.
2008-04-09 Federico Mena Quintero <federico@novell.com> 2008-04-09 Federico Mena Quintero <federico@novell.com>
* glib/gbookmarkfile.c (bookmark_metadata_free): Don't leak * glib/gbookmarkfile.c (bookmark_metadata_free): Don't leak

View File

@ -59,7 +59,8 @@ void g_slice_free_chain_with_offset (gsize block_size,
/* we go through extra hoops to ensure type safety */ /* we go through extra hoops to ensure type safety */
#define g_slice_dup(type, mem) \ #define g_slice_dup(type, mem) \
(1 ? g_slice_copy (sizeof (type), (mem)) : (type*) ((type*) 0 == (mem))) (1 ? (type*) g_slice_copy (sizeof (type), (mem)) \
: ((void) ((type*) 0 == (mem)), (type*) 0))
#define g_slice_free(type, mem) do { \ #define g_slice_free(type, mem) do { \
if (1) g_slice_free1 (sizeof (type), (mem)); \ if (1) g_slice_free1 (sizeof (type), (mem)); \
else (void) ((type*) 0 == (mem)); \ else (void) ((type*) 0 == (mem)); \