glib2/revert-316221.patch
Daniel Williams c3de1709e8 - Revert upstream changes to g_static_mutex_get_mutex_impl_shortcut that
broke users of GMutex and GStaticMutex (bgo#316221)
2008-04-14 00:34:23 +00:00

19 lines
668 B
Diff

--- trunk/glib/gthread.h 2007/10/21 17:01:29 5792
+++ trunk/glib/gthread.h 2008/03/12 15:36:38 6691
@@ -140,9 +140,15 @@
/* internal function for fallback static mutex implementation */
GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex);
+#ifdef __cplusplus
#define g_static_mutex_get_mutex_impl_shortcut(mutex) \
(g_atomic_pointer_get ((gpointer*)(void*)mutex) ? *(mutex) : \
g_static_mutex_get_mutex_impl (mutex))
+#else
+#define g_static_mutex_get_mutex_impl_shortcut(mutex) \
+ (g_atomic_pointer_get (mutex) ? *(mutex) : \
+ g_static_mutex_get_mutex_impl (mutex))
+#endif
/* shorthands for conditional and unconditional function calls */