Function
GLibenviron_unsetenv
since: 2.32
Declaration [src]
gchar**
g_environ_unsetenv(
gchar**envp,
constgchar*variable
)
Description [src]
Removes the environment variable variable from the provided
environment envp.
Available since: 2.32
Parameters
envp-
Type: An array of
filenamean environment list that can be freed using `g_strfreev()` (e.g., as returned from g_get_environ()), or `NULL` for an empty environment list.The argument can beNULL.The array must beNULL-terminated.The called function takes ownership of the data, and is responsible for freeing it.Each element is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows. variable-
Type:
const gchar*The environment variable to remove, must not contain ‘=’.
The data is owned by the caller of the function.The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.
Return value
Type: An array of filename
the updated environment list. Free it using g_strfreev().
The array is
NULL-terminated. The caller of the function takes ownership of the data, and is responsible for freeing it.
Each element is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.