[pango] Make static data thread safe in pangocairo-fcfont.c
- From: Behdad Esfahbod <behdad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] Make static data thread safe in pangocairo-fcfont.c
- Date: Tue, 28 Aug 2012 04:33:57 +0000 (UTC)
commit ba9119bcef52232c38329a5be91d9b5d158f2bc4
Author: Alessandro Pignotti <a pignotti sssup it>
Date: Wed May 25 15:54:01 2011 +0200
Make static data thread safe in pangocairo-fcfont.c
pango/pangocairo-fcfont.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pango/pangocairo-fcfont.c b/pango/pangocairo-fcfont.c
index 1393ce8..6e4fcd9 100644
--- a/pango/pangocairo-fcfont.c
+++ b/pango/pangocairo-fcfont.c
@@ -187,8 +187,8 @@ get_gravity_class (void)
{
static GEnumClass *class = NULL;
- if (G_UNLIKELY (!class))
- class = g_type_class_ref (PANGO_TYPE_GRAVITY);
+ if (g_once_init_enter ((gsize*)&class))
+ g_once_init_leave((gsize*)&class, (gsize)g_type_class_ref (PANGO_TYPE_GRAVITY));
return class;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]