mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
Make the g_getenv() ABI backward compatibility wrapper more robust.
2005-01-01 Tor Lillqvist <tml@iki.fi> * glib/gutils.c: Make the g_getenv() ABI backward compatibility wrapper more robust.
This commit is contained in:
parent
714887d0fa
commit
66f109711a
@ -1,3 +1,8 @@
|
|||||||
|
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gutils.c: Make the g_getenv() ABI backward compatibility
|
||||||
|
wrapper more robust.
|
||||||
|
|
||||||
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* glib/glib.symbols
|
* glib/glib.symbols
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gutils.c: Make the g_getenv() ABI backward compatibility
|
||||||
|
wrapper more robust.
|
||||||
|
|
||||||
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* glib/glib.symbols
|
* glib/glib.symbols
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gutils.c: Make the g_getenv() ABI backward compatibility
|
||||||
|
wrapper more robust.
|
||||||
|
|
||||||
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* glib/glib.symbols
|
* glib/glib.symbols
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gutils.c: Make the g_getenv() ABI backward compatibility
|
||||||
|
wrapper more robust.
|
||||||
|
|
||||||
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* glib/glib.symbols
|
* glib/glib.symbols
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/gutils.c: Make the g_getenv() ABI backward compatibility
|
||||||
|
wrapper more robust.
|
||||||
|
|
||||||
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
2005-01-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* glib/glib.symbols
|
* glib/glib.symbols
|
||||||
|
@ -2386,10 +2386,14 @@ g_getenv (const gchar *variable)
|
|||||||
{
|
{
|
||||||
gchar *utf8_variable = g_locale_to_utf8 (variable, -1, NULL, NULL, NULL);
|
gchar *utf8_variable = g_locale_to_utf8 (variable, -1, NULL, NULL, NULL);
|
||||||
const gchar *utf8_value = g_getenv_utf8 (utf8_variable);
|
const gchar *utf8_value = g_getenv_utf8 (utf8_variable);
|
||||||
gchar *value = g_locale_from_utf8 (utf8_value, -1, NULL, NULL, NULL);
|
gchar *value;
|
||||||
GQuark quark = g_quark_from_string (value);
|
GQuark quark;
|
||||||
|
|
||||||
g_free (utf8_variable);
|
g_free (utf8_variable);
|
||||||
|
if (!utf8_value)
|
||||||
|
return NULL;
|
||||||
|
value = g_locale_from_utf8 (utf8_value, -1, NULL, NULL, NULL);
|
||||||
|
quark = g_quark_from_string (value);
|
||||||
g_free (value);
|
g_free (value);
|
||||||
|
|
||||||
return g_quark_to_string (quark);
|
return g_quark_to_string (quark);
|
||||||
|
Loading…
Reference in New Issue
Block a user