mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01:00
Use 'aay' instead of 'as' for environ
It might contain non-utf8 characters.
This commit is contained in:
parent
641f622bfe
commit
cb64773002
@ -573,10 +573,14 @@ get_platform_data (GApplication *application)
|
||||
|
||||
if (application->priv->flags & G_APPLICATION_SEND_ENVIRONMENT)
|
||||
{
|
||||
gchar **envp = g_get_environ ();
|
||||
g_variant_builder_add (builder, "{sv}", "environ",
|
||||
g_variant_new_strv ((const gchar **) envp, -1));
|
||||
GVariant *array;
|
||||
gchar **envp;
|
||||
|
||||
envp = g_get_environ ();
|
||||
array = g_variant_new_bytestring_array ((const gchar **) envp, -1);
|
||||
g_strfreev (envp);
|
||||
|
||||
g_variant_builder_add (builder, "{sv}", "environ", array);
|
||||
}
|
||||
|
||||
G_APPLICATION_GET_CLASS (application)->
|
||||
|
@ -111,7 +111,8 @@ grok_platform_data (GApplicationCommandLine *cmdline)
|
||||
else if (strcmp (key, "environ") == 0)
|
||||
{
|
||||
if (!cmdline->priv->environ)
|
||||
cmdline->priv->environ = g_variant_get_strv (value, NULL);
|
||||
cmdline->priv->environ =
|
||||
g_variant_get_bytestring_array (value, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user