From 488cee497742bc04861250cb42a94c2678c771b7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 16 Jan 2006 23:03:10 +0000 Subject: [PATCH] Rework the strict aliasing fix to not break C++, pointed out by Murray 2006-01-16 Matthias Clasen * glib/gthread.h (g_static_mutex_get_mutex_impl_shortcut): Rework the strict aliasing fix to not break C++, pointed out by Murray Cumming. --- ChangeLog | 4 ++++ ChangeLog.pre-2-10 | 4 ++++ ChangeLog.pre-2-12 | 4 ++++ glib/gthread.h | 2 +- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 99ee1db5..b9c01356 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-01-16 Matthias Clasen + * glib/gthread.h (g_static_mutex_get_mutex_impl_shortcut): + Rework the strict aliasing fix to not break C++, pointed + out by Murray Cumming. + * glib/gasyncqueue.c (g_async_queue_push_sorted_unlocked): Signal waiting threads, problem noticed by Christian Kellner. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 99ee1db5..b9c01356 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,9 @@ 2006-01-16 Matthias Clasen + * glib/gthread.h (g_static_mutex_get_mutex_impl_shortcut): + Rework the strict aliasing fix to not break C++, pointed + out by Murray Cumming. + * glib/gasyncqueue.c (g_async_queue_push_sorted_unlocked): Signal waiting threads, problem noticed by Christian Kellner. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 99ee1db5..b9c01356 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,5 +1,9 @@ 2006-01-16 Matthias Clasen + * glib/gthread.h (g_static_mutex_get_mutex_impl_shortcut): + Rework the strict aliasing fix to not break C++, pointed + out by Murray Cumming. + * glib/gasyncqueue.c (g_async_queue_push_sorted_unlocked): Signal waiting threads, problem noticed by Christian Kellner. diff --git a/glib/gthread.h b/glib/gthread.h index 2d0170e1..2ae313f4 100644 --- a/glib/gthread.h +++ b/glib/gthread.h @@ -138,7 +138,7 @@ void g_thread_init_with_errorcheck_mutexes (GThreadFunctions* vtable); GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex); #define g_static_mutex_get_mutex_impl_shortcut(mutex) \ - (g_atomic_pointer_get (mutex) ? *(mutex) : \ + (g_atomic_pointer_get ((gpointer*)(void*)mutex) ? *(mutex) : \ g_static_mutex_get_mutex_impl (mutex)) /* shorthands for conditional and unconditional function calls */ -- 2.34.1