diff options
author | Andrew Kuchling <amk@amk.ca> | 2015-04-14 10:35:43 -0400 |
---|---|---|
committer | Andrew Kuchling <amk@amk.ca> | 2015-04-14 10:35:43 -0400 |
commit | 3b3863c2d496f01845eda76ccf6401458714397e (patch) | |
tree | 14af5692bc33ffc3a589478b03e33e597ce17166 /Modules/clinic/spwdmodule.c.h | |
parent | b6b4ba499008572740b20b22481074263fb4e5d7 (diff) | |
parent | da4c26c69f751f7c0207b009b2372bdc12c08bba (diff) | |
download | cpython-3b3863c2d496f01845eda76ccf6401458714397e.tar.gz |
Merge from 3.4
Diffstat (limited to 'Modules/clinic/spwdmodule.c.h')
-rw-r--r-- | Modules/clinic/spwdmodule.c.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/Modules/clinic/spwdmodule.c.h b/Modules/clinic/spwdmodule.c.h new file mode 100644 index 0000000000..e1dde77893 --- /dev/null +++ b/Modules/clinic/spwdmodule.c.h @@ -0,0 +1,70 @@ +/*[clinic input] +preserve +[clinic start generated code]*/ + +#if defined(HAVE_GETSPNAM) + +PyDoc_STRVAR(spwd_getspnam__doc__, +"getspnam($module, arg, /)\n" +"--\n" +"\n" +"Return the shadow password database entry for the given user name.\n" +"\n" +"See `help(spwd)` for more on shadow password database entries."); + +#define SPWD_GETSPNAM_METHODDEF \ + {"getspnam", (PyCFunction)spwd_getspnam, METH_O, spwd_getspnam__doc__}, + +static PyObject * +spwd_getspnam_impl(PyModuleDef *module, PyObject *arg); + +static PyObject * +spwd_getspnam(PyModuleDef *module, PyObject *arg_) +{ + PyObject *return_value = NULL; + PyObject *arg; + + if (!PyArg_Parse(arg_, + "U:getspnam", + &arg)) + goto exit; + return_value = spwd_getspnam_impl(module, arg); + +exit: + return return_value; +} + +#endif /* defined(HAVE_GETSPNAM) */ + +#if defined(HAVE_GETSPENT) + +PyDoc_STRVAR(spwd_getspall__doc__, +"getspall($module, /)\n" +"--\n" +"\n" +"Return a list of all available shadow password database entries, in arbitrary order.\n" +"\n" +"See `help(spwd)` for more on shadow password database entries."); + +#define SPWD_GETSPALL_METHODDEF \ + {"getspall", (PyCFunction)spwd_getspall, METH_NOARGS, spwd_getspall__doc__}, + +static PyObject * +spwd_getspall_impl(PyModuleDef *module); + +static PyObject * +spwd_getspall(PyModuleDef *module, PyObject *Py_UNUSED(ignored)) +{ + return spwd_getspall_impl(module); +} + +#endif /* defined(HAVE_GETSPENT) */ + +#ifndef SPWD_GETSPNAM_METHODDEF + #define SPWD_GETSPNAM_METHODDEF +#endif /* !defined(SPWD_GETSPNAM_METHODDEF) */ + +#ifndef SPWD_GETSPALL_METHODDEF + #define SPWD_GETSPALL_METHODDEF +#endif /* !defined(SPWD_GETSPALL_METHODDEF) */ +/*[clinic end generated code: output=67a4f8c47008f28f input=a9049054013a1b77]*/ |