projects
/
platform
/
upstream
/
pango.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba9119b
)
Make static data thread safe in pango-context.c
author
Alessandro Pignotti
<a.pignotti@sssup.it>
Wed, 25 May 2011 14:04:22 +0000
(16:04 +0200)
committer
Behdad Esfahbod
<behdad@behdad.org>
Tue, 28 Aug 2012 03:21:52 +0000
(23:21 -0400)
pango/pango-context.c
patch
|
blob
|
history
diff --git
a/pango/pango-context.c
b/pango/pango-context.c
index
a909cd0
..
cdb6a53
100644
(file)
--- a/
pango/pango-context.c
+++ b/
pango/pango-context.c
@@
-1368,8
+1368,8
@@
string_from_script (PangoScript script)
{
static GEnumClass *class = NULL;
GEnumValue *value;
- if (
!class
)
-
class = g_type_class_ref (PANGO_TYPE_SCRIPT
);
+ if (
g_once_init_enter ((gsize*)&class)
)
+
g_once_init_leave((gsize*)&class, (gsize)g_type_class_ref (PANGO_TYPE_SCRIPT)
);
value = g_enum_get_value (class, script);
if (!value)