summaryrefslogtreecommitdiff
path: root/Modules/clinic/pwdmodule.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/clinic/pwdmodule.c.h')
-rw-r--r--Modules/clinic/pwdmodule.c.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/clinic/pwdmodule.c.h b/Modules/clinic/pwdmodule.c.h
index 979dfdb07e..9270be0f9b 100644
--- a/Modules/clinic/pwdmodule.c.h
+++ b/Modules/clinic/pwdmodule.c.h
@@ -33,9 +33,14 @@ pwd_getpwnam(PyObject *module, PyObject *arg)
PyObject *return_value = NULL;
PyObject *name;
- if (!PyArg_Parse(arg, "U:getpwnam", &name)) {
+ if (!PyUnicode_Check(arg)) {
+ _PyArg_BadArgument("getpwnam", "str", arg);
goto exit;
}
+ if (PyUnicode_READY(arg) == -1) {
+ goto exit;
+ }
+ name = arg;
return_value = pwd_getpwnam_impl(module, name);
exit:
@@ -69,4 +74,4 @@ pwd_getpwall(PyObject *module, PyObject *Py_UNUSED(ignored))
#ifndef PWD_GETPWALL_METHODDEF
#define PWD_GETPWALL_METHODDEF
#endif /* !defined(PWD_GETPWALL_METHODDEF) */
-/*[clinic end generated code: output=3c93120d6dd86905 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=9e86e23d6ad9cd08 input=a9049054013a1b77]*/