Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Use 'aay' instead of 'as' for environ
Browse files Browse the repository at this point in the history
It might contain non-utf8 characters.
  • Loading branch information
allisonkarlitskaya committed Oct 29, 2010
1 parent 641f622 commit cb64773
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 7 additions & 3 deletions gio/gapplication.c
Expand Up @@ -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)->
Expand Down
3 changes: 2 additions & 1 deletion gio/gapplicationcommandline.c
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit cb64773

Please sign in to comment.