Rework the strict aliasing fix to not break C++, pointed out by Murray

2006-01-16  Matthias Clasen  <mclasen@redhat.com>

	* glib/gthread.h (g_static_mutex_get_mutex_impl_shortcut):
	Rework the strict aliasing fix to not break C++, pointed
	out by Murray Cumming.
This commit is contained in:
Matthias Clasen 2006-01-16 23:03:10 +00:00 committed by Matthias Clasen
parent 5fb7be3961
commit 488cee4977
4 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2006-01-16 Matthias Clasen <mclasen@redhat.com>
* 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.

View File

@ -1,5 +1,9 @@
2006-01-16 Matthias Clasen <mclasen@redhat.com>
* 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.

View File

@ -1,5 +1,9 @@
2006-01-16 Matthias Clasen <mclasen@redhat.com>
* 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.

View File

@ -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 */