mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 20:46:14 +01:00
glib/genviron.c, GSubprocessLauncher: ain't no "filename encoding"
Removed all mentions of GLib file name encoding referring to the environment strings. The env var content has no defined relation to GLib's notion of filename encoding, or any encoding whatsoever. It would be wrong to pass all UTF-8 strings through g_filename_from_utf8() in order to put them into the environment, for one thing. https://bugzilla.gnome.org/show_bug.cgi?id=738185
This commit is contained in:
parent
b31a873fb3
commit
16190d2dcd
@ -237,9 +237,8 @@ g_subprocess_launcher_new (GSubprocessFlags flags)
|
|||||||
* As an alternative, you can use g_subprocess_launcher_setenv(),
|
* As an alternative, you can use g_subprocess_launcher_setenv(),
|
||||||
* g_subprocess_launcher_unsetenv(), etc.
|
* g_subprocess_launcher_unsetenv(), etc.
|
||||||
*
|
*
|
||||||
* All strings in this array are expected to be in the GLib file name
|
* On UNIX, all strings in this array can be arbitrary byte strings.
|
||||||
* encoding. On UNIX, this means that they can be arbitrary byte
|
* On Windows, they should be in UTF-8.
|
||||||
* strings. On Windows, they should be in UTF-8.
|
|
||||||
*
|
*
|
||||||
* Since: 2.40
|
* Since: 2.40
|
||||||
**/
|
**/
|
||||||
@ -261,10 +260,9 @@ g_subprocess_launcher_set_environ (GSubprocessLauncher *self,
|
|||||||
* Sets the environment variable @variable in the environment of
|
* Sets the environment variable @variable in the environment of
|
||||||
* processes launched from this launcher.
|
* processes launched from this launcher.
|
||||||
*
|
*
|
||||||
* Both the variable's name and value should be in the GLib file name
|
* On UNIX, both the variable's name and value can be arbitrary byte
|
||||||
* encoding. On UNIX, this means that they can be arbitrary byte
|
* strings, except that the variable's name cannot contain '='.
|
||||||
* strings. On Windows, they should be in UTF-8.
|
* On Windows, they should be in UTF-8.
|
||||||
*
|
|
||||||
*
|
*
|
||||||
* Since: 2.40
|
* Since: 2.40
|
||||||
**/
|
**/
|
||||||
@ -285,9 +283,8 @@ g_subprocess_launcher_setenv (GSubprocessLauncher *self,
|
|||||||
* Removes the environment variable @variable from the environment of
|
* Removes the environment variable @variable from the environment of
|
||||||
* processes launched from this launcher.
|
* processes launched from this launcher.
|
||||||
*
|
*
|
||||||
* The variable name should be in the GLib file name encoding. On UNIX,
|
* On UNIX, the variable's name can be an arbitrary byte string not
|
||||||
* this means that they can be arbitrary byte strings. On Windows, they
|
* containing '='. On Windows, it should be in UTF-8.
|
||||||
* should be in UTF-8.
|
|
||||||
*
|
*
|
||||||
* Since: 2.40
|
* Since: 2.40
|
||||||
**/
|
**/
|
||||||
@ -306,9 +303,8 @@ g_subprocess_launcher_unsetenv (GSubprocessLauncher *self,
|
|||||||
* Returns the value of the environment variable @variable in the
|
* Returns the value of the environment variable @variable in the
|
||||||
* environment of processes launched from this launcher.
|
* environment of processes launched from this launcher.
|
||||||
*
|
*
|
||||||
* The returned string is in the GLib file name encoding. On UNIX, this
|
* On UNIX, the returned string can be an arbitrary byte string.
|
||||||
* means that it can be an arbitrary byte string. On Windows, it will
|
* On Windows, it will be UTF-8.
|
||||||
* be UTF-8.
|
|
||||||
*
|
*
|
||||||
* Returns: the value of the environment variable, %NULL if unset
|
* Returns: the value of the environment variable, %NULL if unset
|
||||||
*
|
*
|
||||||
|
@ -70,8 +70,7 @@ g_environ_find (gchar **envp,
|
|||||||
* @envp: (allow-none) (array zero-terminated=1) (transfer none): an environment
|
* @envp: (allow-none) (array zero-terminated=1) (transfer none): an environment
|
||||||
* list (eg, as returned from g_get_environ()), or %NULL
|
* list (eg, as returned from g_get_environ()), or %NULL
|
||||||
* for an empty environment list
|
* for an empty environment list
|
||||||
* @variable: the environment variable to get, in the GLib file name
|
* @variable: the environment variable to get
|
||||||
* encoding
|
|
||||||
*
|
*
|
||||||
* Returns the value of the environment variable @variable in the
|
* Returns the value of the environment variable @variable in the
|
||||||
* provided list @envp.
|
* provided list @envp.
|
||||||
@ -218,14 +217,13 @@ g_environ_unsetenv (gchar **envp,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_getenv:
|
* g_getenv:
|
||||||
* @variable: the environment variable to get, in the GLib file name
|
* @variable: the environment variable to get
|
||||||
* encoding
|
|
||||||
*
|
*
|
||||||
* Returns the value of an environment variable.
|
* Returns the value of an environment variable.
|
||||||
*
|
*
|
||||||
* The name and value are in the GLib file name encoding. On UNIX,
|
* On UNIX, the name and value are byte strings which might or might not
|
||||||
* this means the actual bytes which might or might not be in some
|
* be in some consistent character set and encoding. On Windows, they are
|
||||||
* consistent character set and encoding. On Windows, it is in UTF-8.
|
* in UTF-8.
|
||||||
* On Windows, in case the environment variable's value contains
|
* On Windows, in case the environment variable's value contains
|
||||||
* references to other environment variables, they are expanded.
|
* references to other environment variables, they are expanded.
|
||||||
*
|
*
|
||||||
@ -248,10 +246,9 @@ g_getenv (const gchar *variable)
|
|||||||
* @value: the value for to set the variable to.
|
* @value: the value for to set the variable to.
|
||||||
* @overwrite: whether to change the variable if it already exists.
|
* @overwrite: whether to change the variable if it already exists.
|
||||||
*
|
*
|
||||||
* Sets an environment variable. Both the variable's name and value
|
* Sets an environment variable. On UNIX, both the variable's name and
|
||||||
* should be in the GLib file name encoding. On UNIX, this means that
|
* value can be arbitrary byte strings, except that the variable's name
|
||||||
* they can be arbitrary byte strings. On Windows, they should be in
|
* cannot contain '='. On Windows, they should be in UTF-8.
|
||||||
* UTF-8.
|
|
||||||
*
|
*
|
||||||
* Note that on some systems, when variables are overwritten, the memory
|
* Note that on some systems, when variables are overwritten, the memory
|
||||||
* used for the previous variables and its value isn't reclaimed.
|
* used for the previous variables and its value isn't reclaimed.
|
||||||
|
Loading…
Reference in New Issue
Block a user