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:
Tor Lillqvist 2005-01-01 16:55:10 +00:00 committed by Tor Lillqvist
parent 714887d0fa
commit 66f109711a
6 changed files with 31 additions and 2 deletions

View File

@ -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>
* glib/glib.symbols

View File

@ -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>
* glib/glib.symbols

View File

@ -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>
* glib/glib.symbols

View File

@ -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>
* glib/glib.symbols

View File

@ -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>
* glib/glib.symbols

View File

@ -2386,10 +2386,14 @@ g_getenv (const gchar *variable)
{
gchar *utf8_variable = g_locale_to_utf8 (variable, -1, NULL, NULL, NULL);
const gchar *utf8_value = g_getenv_utf8 (utf8_variable);
gchar *value = g_locale_from_utf8 (utf8_value, -1, NULL, NULL, NULL);
GQuark quark = g_quark_from_string (value);
gchar *value;
GQuark quark;
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);
return g_quark_to_string (quark);