diff options
Diffstat (limited to 'Modules/clinic/spwdmodule.c.h')
| -rw-r--r-- | Modules/clinic/spwdmodule.c.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/clinic/spwdmodule.c.h b/Modules/clinic/spwdmodule.c.h index b2479ff245..a0a3e2e5ef 100644 --- a/Modules/clinic/spwdmodule.c.h +++ b/Modules/clinic/spwdmodule.c.h @@ -24,9 +24,14 @@ spwd_getspnam(PyObject *module, PyObject *arg_) PyObject *return_value = NULL; PyObject *arg; - if (!PyArg_Parse(arg_, "U:getspnam", &arg)) { + if (!PyUnicode_Check(arg_)) { + _PyArg_BadArgument("getspnam", "str", arg_); goto exit; } + if (PyUnicode_READY(arg_) == -1) { + goto exit; + } + arg = arg_; return_value = spwd_getspnam_impl(module, arg); exit: @@ -66,4 +71,4 @@ spwd_getspall(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef SPWD_GETSPALL_METHODDEF #define SPWD_GETSPALL_METHODDEF #endif /* !defined(SPWD_GETSPALL_METHODDEF) */ -/*[clinic end generated code: output=07cd8af0afd77fe7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=44a7c196d4b48f4e input=a9049054013a1b77]*/ |
