Fix #316221, Michal Benes, Stanislav Brabec;

2005-12-27  Matthias Clasen  <mclasen@redhat.com>

        Fix #316221, Michal Benes, Stanislav Brabec;

        * configure.in: Fix a strict aliasing problem in
        g_static_mutex_get_mutex().
        * glib/gthread.h: ...and in
        g_static_mutex_get_mutex_impl_shortcut().
This commit is contained in:
Matthias Clasen
2005-12-27 19:50:02 +00:00
committed by Matthias Clasen
parent 97ffe020cd
commit 1e4efb6554
5 changed files with 23 additions and 2 deletions

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 ((gpointer*)mutex) ? *(mutex) : \
(g_atomic_pointer_get (mutex) ? *(mutex) : \
g_static_mutex_get_mutex_impl (mutex))
/* shorthands for conditional and unconditional function calls */