diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-06-12 00:38:13 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-06-12 00:38:13 +0000 |
commit | 4b9a95cf71f5c9cf45159899cc9674fcc248fb83 (patch) | |
tree | a597e6005547e5ac1cffafa83c1c0f284f6bc9cf /pango/pango-language.c | |
parent | 19290cba0704aec45d7cceb81c283f80a79db933 (diff) | |
download | pango-4b9a95cf71f5c9cf45159899cc9674fcc248fb83.tar.gz |
Add G_GNUC_CONST and G_GNUC_PURE annotations.
2007-06-11 Behdad Esfahbod <behdad@gnome.org>
* pango/pango-attributes.h:
* pango/pango-font.h:
* pango/pango-glyph.h:
* pango/pango-gravity.h:
* pango/pango-language.h:
* pango/pango-layout.h:
* pango/pango-matrix.h:
* pango/pango-ot-private.h:
* pango/pango-ot.h:
* pango/pango-renderer.h:
* pango/pango-script.h:
* pango/pango-tabs.h:
* pango/pango-utils.h:
* pango/pangoatsui-private.h:
* pango/pangocairo-atsui.h:
* pango/pangocairo-atsuifont.h:
* pango/pangocairo-fc.h:
* pango/pangocairo-private.h:
* pango/pangocairo-win32.h:
* pango/pangocairo.h:
* pango/pangofc-decoder.h:
* pango/pangofc-font.h:
* pango/pangofc-fontmap.h:
* pango/pangoft2-private.h:
* pango/pangoft2.h:
* pango/pangowin32-private.h:
* pango/pangox-private.h:
* pango/pangoxft-render.h:
* pango/pangoxft.h:
Add G_GNUC_CONST and G_GNUC_PURE annotations.
svn path=/trunk/; revision=2345
Diffstat (limited to 'pango/pango-language.c')
-rw-r--r-- | pango/pango-language.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pango/pango-language.c b/pango/pango-language.c index a74f666d..61124bd0 100644 --- a/pango/pango-language.c +++ b/pango/pango-language.c @@ -193,13 +193,14 @@ _pango_get_lc_ctype (void) PangoLanguage * pango_language_get_default (void) { - gchar *lang; - PangoLanguage *result; - - lang = _pango_get_lc_ctype (); + static PangoLanguage *result = NULL; - result = pango_language_from_string (lang); - g_free (lang); + if (G_UNLIKELY (!result)) + { + gchar *lang = _pango_get_lc_ctype (); + result = pango_language_from_string (lang); + g_free (lang); + } return result; } |