mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-30 20:33:08 +02:00
gutils: stop using GStaticPrivate
This was our last internal use.
This commit is contained in:
parent
62fe053268
commit
3ebdb4d46a
@ -3342,14 +3342,14 @@ language_names_cache_free (gpointer data)
|
|||||||
const gchar * const *
|
const gchar * const *
|
||||||
g_get_language_names (void)
|
g_get_language_names (void)
|
||||||
{
|
{
|
||||||
static GStaticPrivate cache_private = G_STATIC_PRIVATE_INIT;
|
static GPrivate cache_private = G_PRIVATE_INIT (language_names_cache_free);
|
||||||
GLanguageNamesCache *cache = g_static_private_get (&cache_private);
|
GLanguageNamesCache *cache = g_private_get (&cache_private);
|
||||||
const gchar *value;
|
const gchar *value;
|
||||||
|
|
||||||
if (!cache)
|
if (!cache)
|
||||||
{
|
{
|
||||||
cache = g_new0 (GLanguageNamesCache, 1);
|
cache = g_new0 (GLanguageNamesCache, 1);
|
||||||
g_static_private_set (&cache_private, cache, language_names_cache_free);
|
g_private_set (&cache_private, cache);
|
||||||
}
|
}
|
||||||
|
|
||||||
value = guess_category_value ("LC_MESSAGES");
|
value = guess_category_value ("LC_MESSAGES");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user