genviron: fix g_setenv(var, NULL) and some other stuff
authorDan Winship <danw@gnome.org>
Sat, 19 Oct 2013 15:31:06 +0000 (11:31 -0400)
committerDan Winship <danw@gnome.org>
Sat, 19 Oct 2013 15:33:25 +0000 (11:33 -0400)
commitd94d6ecd3f4928d2ea0755841a9f1b381a1c7d99
treeb5d23ce013690186e780553e937dd65ce8202f3c
parent2907d4cc718658556ff0cf56ffec35b419409abf
genviron: fix g_setenv(var, NULL) and some other stuff

Passing a NULL value to g_setenv() was never documented as working,
and in fact it worked on some platforms and crashed on others. Make it
g_return_if_fail() everywhere insted.

Also, remove some incorrect docs in g_environ_getenv() and
g_environ_setenv() that shouldn't have been copied from g_getenv() and
g_setenv(). And belatedly simplify the checks in g_unsetenv().

https://bugzilla.gnome.org/show_bug.cgi?id=704593
glib/genviron.c