mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +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)
|
if (application->priv->flags & G_APPLICATION_SEND_ENVIRONMENT)
|
||||||
{
|
{
|
||||||
gchar **envp = g_get_environ ();
|
GVariant *array;
|
||||||
g_variant_builder_add (builder, "{sv}", "environ",
|
gchar **envp;
|
||||||
g_variant_new_strv ((const gchar **) envp, -1));
|
|
||||||
|
envp = g_get_environ ();
|
||||||
|
array = g_variant_new_bytestring_array ((const gchar **) envp, -1);
|
||||||
g_strfreev (envp);
|
g_strfreev (envp);
|
||||||
|
|
||||||
|
g_variant_builder_add (builder, "{sv}", "environ", array);
|
||||||
}
|
}
|
||||||
|
|
||||||
G_APPLICATION_GET_CLASS (application)->
|
G_APPLICATION_GET_CLASS (application)->
|
||||||
|
@ -111,7 +111,8 @@ grok_platform_data (GApplicationCommandLine *cmdline)
|
|||||||
else if (strcmp (key, "environ") == 0)
|
else if (strcmp (key, "environ") == 0)
|
||||||
{
|
{
|
||||||
if (!cmdline->priv->environ)
|
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