diff options
Diffstat (limited to 'Modules/clinic')
-rw-r--r-- | Modules/clinic/posixmodule.c.h | 42 |
1 files changed, 3 insertions, 39 deletions
diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h index 661d91a..aa4756a 100644 --- a/Modules/clinic/posixmodule.c.h +++ b/Modules/clinic/posixmodule.c.h @@ -6125,43 +6125,7 @@ exit: #endif /* defined(HAVE_PUTENV) && !defined(MS_WINDOWS) */ -#if defined(MS_WINDOWS) - -PyDoc_STRVAR(os_unsetenv__doc__, -"unsetenv($module, name, /)\n" -"--\n" -"\n" -"Delete an environment variable."); - -#define OS_UNSETENV_METHODDEF \ - {"unsetenv", (PyCFunction)os_unsetenv, METH_O, os_unsetenv__doc__}, - -static PyObject * -os_unsetenv_impl(PyObject *module, PyObject *name); - -static PyObject * -os_unsetenv(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - PyObject *name; - - if (!PyUnicode_Check(arg)) { - _PyArg_BadArgument("unsetenv", "argument", "str", arg); - goto exit; - } - if (PyUnicode_READY(arg) == -1) { - goto exit; - } - name = arg; - return_value = os_unsetenv_impl(module, name); - -exit: - return return_value; -} - -#endif /* defined(MS_WINDOWS) */ - -#if (defined(HAVE_UNSETENV) && !defined(MS_WINDOWS)) +#if defined(HAVE_UNSETENV) PyDoc_STRVAR(os_unsetenv__doc__, "unsetenv($module, name, /)\n" @@ -6193,7 +6157,7 @@ exit: return return_value; } -#endif /* (defined(HAVE_UNSETENV) && !defined(MS_WINDOWS)) */ +#endif /* defined(HAVE_UNSETENV) */ PyDoc_STRVAR(os_strerror__doc__, "strerror($module, code, /)\n" @@ -8809,4 +8773,4 @@ exit: #ifndef OS__REMOVE_DLL_DIRECTORY_METHODDEF #define OS__REMOVE_DLL_DIRECTORY_METHODDEF #endif /* !defined(OS__REMOVE_DLL_DIRECTORY_METHODDEF) */ -/*[clinic end generated code: output=6e739a2715712e88 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=51ba5b9536420cea input=a9049054013a1b77]*/ |