mirror of
https://github.com/python/cpython.git
synced 2025-11-13 07:26:31 +00:00
merge 3.2
This commit is contained in:
commit
e8eb0e82f3
1 changed files with 5 additions and 1 deletions
|
|
@ -7844,12 +7844,16 @@ posix_unsetenv(PyObject *self, PyObject *args)
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "O&:unsetenv",
|
if (!PyArg_ParseTuple(args, "O&:unsetenv",
|
||||||
|
|
||||||
PyUnicode_FSConverter, &name))
|
PyUnicode_FSConverter, &name))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
||||||
err = unsetenv(PyBytes_AS_STRING(name));
|
err = unsetenv(PyBytes_AS_STRING(name));
|
||||||
if (err)
|
if (err) {
|
||||||
|
Py_DECREF(name);
|
||||||
return posix_error();
|
return posix_error();
|
||||||
|
}
|
||||||
|
|
||||||
/* Remove the key from posix_putenv_garbage;
|
/* Remove the key from posix_putenv_garbage;
|
||||||
* this will cause it to be collected. This has to
|
* this will cause it to be collected. This has to
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue