Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6267996

Browse files
committed
Put docstring for getspall into same #ifdef block as function definition
Remove C++ (C99) style comments
1 parent 93f18f6 commit 6267996

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

Modules/spwdmodule.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,21 @@ static PyObject* spwd_getspnam(PyObject *self, PyObject *args)
121121
return mkspent(p);
122122
}
123123

124+
#endif /* HAVE_GETSPNAM */
125+
126+
#ifdef HAVE_GETSPENT
127+
124128
PyDoc_STRVAR(spwd_getspall__doc__,
125129
"getspall() -> list_of_entries\n\
126130
Return a list of all available shadow password database entries, \
127131
in arbitrary order.\n\
128132
See spwd.__doc__ for more on shadow password database entries.");
129133

130-
#endif /* HAVE_GETSPNAM */
131-
132-
#ifdef HAVE_GETSPENT
133-
134134
static PyObject *
135135
spwd_getspall(PyObject *self, PyObject *args)
136136
{
137137
PyObject *d;
138138
struct spwd *p;
139-
// if (!PyArg_NoArgs(args))
140-
// return NULL;
141139
if ((d = PyList_New(0)) == NULL)
142140
return NULL;
143141
setspent();

0 commit comments

Comments
 (0)