mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS.
This commit is contained in:
parent
57f8e06e4f
commit
3a6f97850b
9 changed files with 65 additions and 122 deletions
|
@ -120,12 +120,10 @@ in arbitrary order.\n\
|
|||
See pwd.__doc__ for more on password database entries.";
|
||||
|
||||
static PyObject *
|
||||
pwd_getpwall(PyObject *self, PyObject *args)
|
||||
pwd_getpwall(PyObject *self)
|
||||
{
|
||||
PyObject *d;
|
||||
struct passwd *p;
|
||||
if (!PyArg_NoArgs(args))
|
||||
return NULL;
|
||||
if ((d = PyList_New(0)) == NULL)
|
||||
return NULL;
|
||||
#if defined(PYOS_OS2) && defined(PYCC_GCC)
|
||||
|
@ -151,7 +149,7 @@ static PyMethodDef pwd_methods[] = {
|
|||
{"getpwuid", pwd_getpwuid, METH_OLDARGS, pwd_getpwuid__doc__},
|
||||
{"getpwnam", pwd_getpwnam, METH_OLDARGS, pwd_getpwnam__doc__},
|
||||
#ifdef HAVE_GETPWENT
|
||||
{"getpwall", pwd_getpwall, METH_OLDARGS, pwd_getpwall__doc__},
|
||||
{"getpwall", pwd_getpwall, METH_NOARGS, pwd_getpwall__doc__},
|
||||
#endif
|
||||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue